services: inference_service: build: context: ./inference_service ports: - "8001:8001" networks: - vigil-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8001/health"] interval: 30s timeout: 10s retries: 5 start_period: 30s gateway: build: context: ./gateway ports: - "8000:8000" environment: - INFERENCE_URL=http://inference_service:8001 depends_on: inference_service: condition: service_healthy networks: - vigil-network anomaly_detector: build: context: ./anomaly_detector ports: - "8002:8002" environment: - PROMETHEUS_URL=http://prometheus:9090 - ANOMALY_THRESHOLD=0.8 - ARTIFACTS_DIR=/artifacts volumes: - ./artifacts:/artifacts depends_on: prometheus: condition: service_started networks: - vigil-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8002/health"] interval: 30s timeout: 10s retries: 5 start_period: 15s anomaly_trainer: build: context: ./anomaly_trainer ports: - "8003:8003" environment: - PROMETHEUS_URL=http://prometheus:9090 - ARTIFACTS_DIR=/artifacts - RETRAIN_POLICY_ENABLED=true - RETRAIN_INTERVAL_MINUTES=60 - RETRAIN_DATASET_NAME=anomaly-metrics - RETRAIN_MODEL_NAME=isolation-forest - RETRAIN_LOOKBACK_MINUTES=15 - RETRAIN_STEP_SECONDS=30 - DRIFT_POLICY_ENABLED=true - DRIFT_INTERVAL_MINUTES=15 - DRIFT_THRESHOLD=0.35 volumes: - ./artifacts:/artifacts depends_on: prometheus: condition: service_started networks: - vigil-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8003/health"] interval: 30s timeout: 10s retries: 5 start_period: 15s prometheus: image: prom/prometheus:v3.5.0 ports: - "9090:9090" volumes: - ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro depends_on: inference_service: condition: service_healthy gateway: condition: service_started networks: - vigil-network grafana: image: grafana/grafana:12.1.1 ports: - "3000:3000" environment: - GF_SECURITY_ADMIN_USER=admin - GF_SECURITY_ADMIN_PASSWORD=admin - GF_PATHS_PROVISIONING=/etc/grafana/provisioning volumes: - ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro - ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro depends_on: - prometheus - anomaly_detector - anomaly_trainer networks: - vigil-network networks: vigil-network: driver: bridge