37 lines
777 B
YAML
37 lines
777 B
YAML
services:
|
|
api:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
# Redis configuration
|
|
- REDIS_HOST=valkey
|
|
- REDIS_PORT=6379
|
|
# Docker environment flag
|
|
- DOCKER_CONTAINER=1
|
|
# Override environment for production
|
|
- ENVIRONMENT=production
|
|
env_file: .env
|
|
depends_on:
|
|
- valkey
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
valkey:
|
|
image: valkey/valkey:7-alpine
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "ping"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
volumes:
|
|
- valkey_data:/data
|
|
|
|
volumes:
|
|
valkey_data:
|