Some checks reported errors
continuous-integration/drone Build encountered an error
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
quiz-bot:
|
|
image: quiz-bot:${IMAGE_TAG:-latest}
|
|
container_name: quiz-bot-prod
|
|
restart: always
|
|
environment:
|
|
- BOT_TOKEN=${BOT_TOKEN}
|
|
- DATABASE_PATH=data/quiz_bot.db
|
|
- CSV_DATA_PATH=data/
|
|
- LOG_LEVEL=INFO
|
|
volumes:
|
|
# Production data volumes
|
|
- quiz-bot-data:/app/data
|
|
- quiz-bot-logs:/app/logs
|
|
networks:
|
|
- quiz-bot-prod
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import sqlite3; conn = sqlite3.connect('/app/data/quiz_bot.db'); conn.close()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 5
|
|
start_period: 90s
|
|
# Production resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '0.2'
|
|
memory: 256M
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
|
|
networks:
|
|
quiz-bot-prod:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
quiz-bot-data:
|
|
driver: local
|
|
quiz-bot-logs:
|
|
driver: local
|