-
-
Notifications
You must be signed in to change notification settings - Fork 280
Docker Setup
Ticket-Bot includes a Dockerfile and docker-compose.yml for containerized hosting.
The compose service uses:
env_file:
- ./config/.env
volumes:
- ./config:/app/config:ro
- ./messages:/app/messages:ro
- ./.data:/app/.dataThis means:
-
config/.envprovides runtime environment variables. -
config/config.tsis mounted into the container. -
messages/is mounted so message templates can be customized without rebuilding the image. -
.data/is mounted so the SQLite database survives container recreation.
Create config/.env:
DISCORD_TOKEN=your_bot_token_here
DB_FILE_NAME=file:/app/.data/ticket-bot.db
TICKETPM_PASSKEY=Copy and edit the config:
cp config/config.example.ts config/config.tsPowerShell:
Copy-Item config/config.example.ts config/config.tsReplace the placeholder Discord IDs in config/config.ts before starting the container.
docker compose up -d --buildView logs:
docker compose logs -f botStop:
docker compose downDo not delete .data/ unless you intentionally want to remove local ticket history and panel tracking.
Back up:
.data/config/config.tsconfig/.env- custom files under
messages/
git pull
docker compose up -d --buildIf a release includes database schema changes, make sure the schema is applied. The project has a bun run drizzle:push script for that.
If the bot starts but does not post panels:
- Check
docker compose logs -f bot. - Confirm
DISCORD_TOKENis present inconfig/.env. - Confirm
DB_FILE_NAMEpoints inside/app/.data. - Confirm
config/config.tsexists and has real Discord IDs. - Confirm the bot can access each configured panel channel.
If the image build fails around database setup, run the local installation path in Installation while checking the Dockerfile and build context. The runtime container still expects the same config/, messages/, and .data/ layout described above.