No description
i18n | ||
migrations | ||
src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
docker-compose.yml | ||
Earthfile | ||
readme.md |
Geekbot.rs
A General Purpose Discord Bot written in Rust.
This is the third implementation of the bot.
You can invite Geekbot to your server with this link
Website: https://geekbot.pizzaandcoffee.rocks/
Technologies
- Rust
- Postgres
- Serenity
- SQLx
Running
Configuration
Configuration is done through environment variables.
Variable | Description | Required | Default |
---|---|---|---|
GEEKBOT_TOKEN | The bot's token | Yes | |
GEEKBOT_DB_CONN_STR | The database connection string | Yes | |
GEEKBOT_API_ADDRESS | Address on which the API listens | No | [::0]:12995 |
GEEKBOT_SENTRY_DSN | A Sentry DSN | No |
Migrations
Database migrations are managed with the SQLx CLI;
They can be run with the follwoing command:
export DATABASE_URL=postgres://...
sqlx migrate run
alternatively, you can use docker
docker run --rm -it --net=host -e 'DATABASE_URL=postgres://' git.boerlage.me/daan/geekbot-rs-migrations:latest migrate run
Running
Either build and run the project locally
cargo run --release
or use docker
docker run --name geekbot-rs --env-file=./.env git.boerlage.me/daan/geekbot-rs:latest
Building docker images
The docker images are built using Earthly
Building is done with the following command
earthly +all
Contributing
Everyone is free to contribute, please open an issue before creating a PR.