Spaces:
Running
Running
| version: '3.8' | |
| services: | |
| # FastAPI Application | |
| app: | |
| build: . | |
| container_name: automl-app | |
| ports: | |
| - "8000:8000" | |
| volumes: | |
| - ./artifacts:/app/artifacts | |
| - ./monitoring:/app/monitoring | |
| - ./mlruns:/app/mlruns | |
| environment: | |
| - MLFLOW_TRACKING_URI=${MLFLOW_TRACKING_URI} | |
| - DAGSHUB_TOKEN=${DAGSHUB_TOKEN} | |
| restart: unless-stopped | |
| healthcheck: | |
| test: ["CMD", "curl", "-f", "http://localhost:8000/health"] | |
| interval: 30s | |
| timeout: 10s | |
| retries: 3 | |
| # Prometheus for metrics | |
| prometheus: | |
| image: prom/prometheus:latest | |
| container_name: automl-prometheus | |
| ports: | |
| - "9090:9090" | |
| volumes: | |
| - ./observability/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml | |
| - ./observability/prometheus/alerts.yml:/etc/prometheus/alerts.yml | |
| - prometheus-data:/prometheus | |
| command: | |
| - '--config.file=/etc/prometheus/prometheus.yml' | |
| - '--storage.tsdb.path=/prometheus' | |
| restart: unless-stopped | |
| depends_on: | |
| - app | |
| # Grafana for visualization | |
| grafana: | |
| image: grafana/grafana:latest | |
| container_name: automl-grafana | |
| ports: | |
| - "3000:3000" | |
| volumes: | |
| - ./observability/grafana/provisioning:/etc/grafana/provisioning | |
| - ./observability/grafana/dashboards:/var/lib/grafana/dashboards | |
| - grafana-data:/var/lib/grafana | |
| environment: | |
| - GF_SECURITY_ADMIN_PASSWORD=admin | |
| - GF_USERS_ALLOW_SIGN_UP=false | |
| restart: unless-stopped | |
| depends_on: | |
| - prometheus | |
| volumes: | |
| prometheus-data: | |
| grafana-data: | |