-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
30 lines (28 loc) · 751 Bytes
/
Copy pathcompose.yaml
File metadata and controls
30 lines (28 loc) · 751 Bytes
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
services:
api:
build: ./backend
ports:
- "8000:8000"
volumes:
- tasks-data:/data
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request, sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/api/health', timeout=2).status == 200 else 1)"]
interval: 5s
timeout: 3s
retries: 5
start_period: 3s
web:
build: ./frontend
ports:
- "5500:5500"
depends_on:
api:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://localhost:5500/').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
interval: 5s
timeout: 3s
retries: 5
start_period: 2s
volumes:
tasks-data: