Spaces:
Sleeping
Sleeping
File size: 2,307 Bytes
8b83582 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | version: "3.9"
services:
# -------------------------------------------------------------------------
# FastAPI inference API → http://localhost:8000
# Swagger docs → http://localhost:8000/docs
# -------------------------------------------------------------------------
api:
build:
context: .
dockerfile: Dockerfile.api
ports:
- "8000:8000"
volumes:
- ./checkpoints:/app/checkpoints
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
# -------------------------------------------------------------------------
# Gradio UI → http://localhost:7860
# -------------------------------------------------------------------------
gradio:
build:
context: .
dockerfile: Dockerfile
ports:
- "7860:7860"
volumes:
- ./checkpoints:/app/checkpoints
depends_on:
- api
restart: unless-stopped
# -------------------------------------------------------------------------
# Prometheus → http://localhost:9090
# -------------------------------------------------------------------------
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.retention.time=7d"
depends_on:
- api
restart: unless-stopped
# -------------------------------------------------------------------------
# Grafana → http://localhost:3000 (admin / admin)
# -------------------------------------------------------------------------
grafana:
image: grafana/grafana:latest
ports:
- "3001:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ./monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- ./monitoring/grafana/dashboards:/var/lib/grafana/dashboards:ro
depends_on:
- prometheus
restart: unless-stopped
volumes:
prometheus_data:
grafana_data:
|