From ef15653ad15ad24d542d33277fc2bc62de5cf7d4 Mon Sep 17 00:00:00 2001 From: azyrite Date: Tue, 11 Mar 2025 17:11:42 +1100 Subject: [PATCH] chore: add readme instructions --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5443299 --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# Placid Ticketing System + +> Made for the Pacifica Discord server + +This program has only been tested with **rustc 1.84.0** on x86_64. No cross-platform compatibilities are guaratneed. + +# Configuration + +A configuration file must be provided along with appropriate environment variables. By default, the program expects the config file to be at `$PWD/config.toml`, but this path can be overriden with then `CONFIG_PATH` environment variable. + +## Environment Variables + +`CONFIG_PATH` - Override the configuration file's location. + +`DISCORD_TOKEN` - **Required**: The Discord token of the bot. Create a bot at [discord.dev](https://discord.dev). + +`ENV` - **Required**: Set to 'production' or 'development'. Controls where commands are registered and the running of embedded database migrations. + +`TEST_GUILD` - Only required if `ENV` is set to 'development'. + +`DATABASE_URL` - **Required**: A PostgreSQL database URL in the format `postgres://username:password@host:port/database` + +## Configuration File + +See the existing example in this repository. This configuration file should be in toml and configures the exact channel and role IDs to use, which differ between servers and may change, so it is not hardcoded into the binary. + +# Installation + +Compile and place the binary somewhere. It is recommended to use a process manager such as `systemd` or to dockerize this software for easier deployment.