-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (58 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
62 lines (58 loc) · 1.52 KB
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
# Docker Compose - Root Configuration
# For detailed deployment configs, see deployments/docker/
services:
app:
build:
context: .
dockerfile: deployments/docker/Dockerfile
target: runtime
image: yolo-toys:latest
container_name: yolo-toys
restart: unless-stopped
env_file:
- config/.env.example
environment:
- PORT=${PORT:-8000}
- UVICORN_WORKERS=${UVICORN_WORKERS:-1}
ports:
- "${PORT:-8000}:${PORT:-8000}"
volumes:
- model-cache:/app/.cache
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8000}/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 40s
# Monitoring stack (optional)
prometheus:
image: prom/prometheus:v2.55.0
container_name: yolo-toys-prometheus
restart: unless-stopped
volumes:
- ./deployments/monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
ports:
- "9090:9090"
profiles:
- monitoring
grafana:
image: grafana/grafana:11.3.0
container_name: yolo-toys-grafana
restart: unless-stopped
volumes:
- ./deployments/monitoring/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana-data:/var/lib/grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
profiles:
- monitoring
volumes:
model-cache:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local