From the project directory, you can build and run forward_bot directly with Cargo using the included just tasks:
just run— build and run the bot in debug mode (development build)just run-release— build and run the bot in release mode (optimized build)CONFIG=config-another.toml just run— run with an alternate configuration file (config-another.tomlinstead of the default)
Alternatively, you can run forward_bot as a Docker container.
just docker-build [VERSION=latest]— build the Docker image locally. By default, tags asforward-bot:latest, orforward-bot:<VERSION>if specifiedjust docker-run [VERSION=latest]— run the Docker container from the built image. By default, usesforward-bot:latest, orforward-bot:<VERSION>if specified.just docker-stop— stop the running containerjust docker-rm— remove the stopped containerjust docker [VERSION=latest]— convenience command that stops, removes, then runs the containerjust docker-rmi [VERSION=latest]— remove the Docker image. By default, removesforward-bot:latest, orforward-bot:<VERSION>if specified
You can also use Docker Compose to manage the bot and its dependencies without needing to manually build and run the container each time:
just docker-up— start the servicejust docker-down— down the service
Use these commands to manage Docker images:
just docker-pull <username> [VERSION=latest]— pull the<username>/forward-bot:<VERSION>image from Docker Hub and tag it locallyjust docker-push <username> [VERSION=latest]— build, tag, and push the image to<username>/forward-bot:<VERSION>on Docker Hub
For code style and lint checks, run:
just fmt— format the source code (runscargo fmt)just clippy— run the Rust linter (runscargo clippy) to catch common issues