Spaces:
Running
Running
| version: '3.8' | |
| services: | |
| api: | |
| build: . | |
| ports: | |
| - "8001:8001" # Changed from 8000 to match Dockerfile | |
| environment: | |
| - REDIS_URL=redis://redis:6379/0 | |
| - USE_ML=true | |
| - REJECT_THRESHOLD=0.65 | |
| - LOG_LEVEL=INFO | |
| volumes: | |
| - ./data:/app/data | |
| - ./models:/app/models | |
| - ./uploads:/app/uploads | |
| - ./logs:/app/logs | |
| depends_on: | |
| redis: | |
| condition: service_healthy | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:8001/health"] # Fixed port | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 8G | |
| reservations: | |
| memory: 4G | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - redis_data:/data | |
| command: redis-server --appendonly yes --maxmemory 1gb --maxmemory-policy allkeys-lru | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 10s | |
| timeout: 5s | |
| retries: 3 | |
| monitoring: | |
| image: grafana/grafana:latest | |
| ports: | |
| - "3000:3000" | |
| environment: | |
| - GF_SECURITY_ADMIN_PASSWORD=admin | |
| - GF_INSTALL_PLUGINS=grafana-piechart-panel | |
| volumes: | |
| - grafana_data:/var/lib/grafana | |
| - ./monitoring/dashboards:/etc/grafana/provisioning/dashboards | |
| - ./monitoring/datasources:/etc/grafana/provisioning/datasources | |
| depends_on: | |
| - api | |
| synthetic-generator: | |
| build: . | |
| command: python scripts/generate_synthetic.py --samples 10000 --tampering 0.2 --processes 2 | |
| volumes: | |
| - ./data:/app/data | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 4G | |
| reservations: | |
| memory: 2G | |
| volumes: | |
| redis_data: | |
| grafana_data: |