-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
108 lines (99 loc) · 2.82 KB
/
docker-compose.yml
File metadata and controls
108 lines (99 loc) · 2.82 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: "3.9"
services:
# ─── MedGuard Services ───────────────────────────────────────────────────
server:
build:
context: .
dockerfile: Dockerfile
target: server
ports:
- "3001:3001"
- "3002:3002"
- "3003:3003"
- "3004:3004"
- "3005:3005"
env_file: .env
environment:
- NODE_ENV=production
volumes:
- medguard-data:/app/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3004/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_AGENT_URL=http://localhost:3004
- NODE_ENV=production
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 20s
depends_on:
server:
condition: service_healthy
restart: unless-stopped
# ─── Infrastructure ───────────────────────────────────────────────────────
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
# ─── Observability ────────────────────────────────────────────────────────
prometheus:
image: prom/prometheus:v2.51.0
ports:
- "9090:9090"
volumes:
- ./infra/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--web.enable-lifecycle"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:9090/-/ready"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
grafana:
image: grafana/grafana:10.4.0
ports:
- "3030:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana-data:/var/lib/grafana
- ./infra/grafana/provisioning:/etc/grafana/provisioning:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 10s
timeout: 5s
retries: 5
depends_on:
- prometheus
restart: unless-stopped
volumes:
medguard-data:
prometheus-data:
grafana-data: