feat: Add Docker Compose setup for the bot and PostgreSQL database, and update Dockerfile to expose port 8000 and unbuffer Python output.

This commit is contained in:
virtus
2026-01-16 19:39:45 +07:00
parent b24365927a
commit e120474b9d
3 changed files with 72 additions and 4 deletions
+31
View File
@@ -0,0 +1,31 @@
version: '3.8'
services:
bot:
image: fevirtus/virtus-bot:latest
container_name: virtus_bot
restart: always
ports:
- "8000:8000"
environment:
- BOT_TOKEN=${BOT_TOKEN}
- POSTGRES_URL=${POSTGRES_URL:-postgresql+asyncpg://virtus:password@db:5432/virtus_bot}
depends_on:
- db
command: uv run python main.py
db:
image: postgres:15-alpine
container_name: virtus_db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER:-virtus}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_DB=${POSTGRES_DB:-virtus_bot}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
postgres_data: