Docker Compose is the quickest way to get SudoBot running in a contained environment. The includedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/onesoft-sudo/sudobot/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose.yml starts three services: SudoBot itself, a PostgreSQL database, and Adminer for database administration.
Services
| Service | Image | Port | Description |
|---|---|---|---|
sudobot | Built from local Dockerfile | 4000 | The bot process |
postgres | postgres:16-alpine | Internal | PostgreSQL database |
adminer | adminer | 8080 | Web-based DB admin UI |
Setup
Create the Docker environment file
Copy the example env file and fill in your values:Edit
.env.docker with your Discord credentials and other settings. The key variables are:.env.docker
The
DB_URL is automatically set by the Docker entrypoint to connect to the postgres service. You don’t need to set it manually in the Docker environment file.Create required directories and files
The Compose file mounts several local directories into the container. Create them:
Volume mounts
Thesudobot service mounts the following local paths:
| Local path | Container path | Purpose |
|---|---|---|
./config | /app/config | Guild and system config files |
./logs | /app/logs | Log files |
./storage | /app/storage | Persistent bot data |
./tmp | /app/tmp | Temporary files |
./.migration_status | /app/.migration_status | Migration state tracking |
./.env.docker | /app/.env | Environment variables |
Managing the stack
Database migrations
Database migrations run automatically on first startup when.migration_status is empty. To re-run migrations manually:
