51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
pit-router:
|
||
|
|
build: .
|
||
|
|
ports:
|
||
|
|
- "1999:1999"
|
||
|
|
environment:
|
||
|
|
- FLASK_ENV=production
|
||
|
|
- SECRET_KEY=${SECRET_KEY}
|
||
|
|
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
|
||
|
|
- DATABASE_URL=sqlite:////app/data/pit.db
|
||
|
|
- REDIS_URL=redis://redis:6379/0
|
||
|
|
volumes:
|
||
|
|
- pit-data:/app/data
|
||
|
|
- pit-logs:/app/logs
|
||
|
|
depends_on:
|
||
|
|
redis:
|
||
|
|
condition: service_healthy
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "curl", "-f", "http://localhost:1999/health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
start_period: 40s
|
||
|
|
deploy:
|
||
|
|
resources:
|
||
|
|
limits:
|
||
|
|
cpus: '2.0'
|
||
|
|
memory: 2G
|
||
|
|
reservations:
|
||
|
|
cpus: '0.5'
|
||
|
|
memory: 512M
|
||
|
|
|
||
|
|
redis:
|
||
|
|
image: redis:7-alpine
|
||
|
|
volumes:
|
||
|
|
- redis-data:/data
|
||
|
|
restart: unless-stopped
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "redis-cli", "ping"]
|
||
|
|
interval: 10s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 5
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
pit-data:
|
||
|
|
pit-logs:
|
||
|
|
redis-data:
|