fetch_ml/deployments/docker-compose.prod.yml
Jeremie Fraeys 03cead6319 Organize docker-compose files and fix test output paths
- Move docker-compose.prod.yml and docker-compose.homelab-secure.yml to deployments/
- Create deployments/README.md with usage instructions
- Update test scripts to use new deployment paths
- Fix performance regression detection to output to tests/bin/
- All test outputs now properly organized in tests/bin/
2025-12-06 13:45:05 -05:00

74 lines
2 KiB
YAML

# Full Production Docker Environment with Podman and SQLite
services:
redis:
image: redis:7-alpine
container_name: ml-prod-redis
ports:
- "6379:6379"
volumes:
- redis_prod_data:/data
restart: unless-stopped
command: redis-server --appendonly yes
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
api-server:
build:
context: .
dockerfile: build/docker/secure-prod.Dockerfile
container_name: ml-prod-api
ports:
- "9103:9101" # API server port
- "2222:2222" # Secure SSH port for Podman communication
- "9100:9100" # Prometheus metrics
volumes:
- ./data:/app/data/experiments
- ./logs:/logs
- ./configs/config-multi-user.yaml:/app/configs/config.yaml
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
environment:
- REDIS_URL=redis://redis:6379
- LOG_LEVEL=info
healthcheck:
test: [ "CMD", "curl", "-k", "https://localhost:9101/health" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Start SSH daemon for Podman communication
command: ["/usr/local/bin/api-server", "-config", "/app/configs/config.yaml"]
worker:
build:
context: .
dockerfile: build/docker/secure-prod.Dockerfile
container_name: ml-prod-worker
volumes:
- ./data:/app/data/experiments
- ./logs:/logs
- ./configs/worker-docker.yaml:/app/configs/worker.yaml
depends_on:
redis:
condition: service_healthy
api-server:
condition: service_healthy
restart: unless-stopped
environment:
- REDIS_URL=redis://redis:6379
- LOG_LEVEL=info
privileged: true # Required for Podman to work in Docker
command: ["/usr/local/bin/worker", "-config", "/app/configs/worker.yaml"]
volumes:
redis_prod_data:
driver: local
networks:
default:
name: ml-prod-network