-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdeploy-compose.yml
More file actions
70 lines (65 loc) · 1.6 KB
/
Copy pathdeploy-compose.yml
File metadata and controls
70 lines (65 loc) · 1.6 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
services:
backend:
image: davidloe/abrechnung-backend:2
restart: unless-stopped
depends_on:
- db
- redis
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:8000/ready"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
ports:
- ${BACKEND_PORT}:8000
env_file:
- .env
frontend:
image: davidloe/abrechnung-frontend:2
restart: unless-stopped
depends_on:
- backend
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:8080/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
ports:
- ${FRONTEND_PORT}:8080
env_file:
- .env
worker:
image: davidloe/abrechnung-backend:2
command: node dist/workers/start.js
restart: unless-stopped
depends_on:
- backend
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"import('ioredis').then(async ({ default: Redis }) => { const redis = new Redis(process.env.REDIS_URL); try { const pong = await redis.ping(); await redis.quit(); process.exit(pong === 'PONG' ? 0 : 1); } catch { try { redis.disconnect(); } catch {} process.exit(1); } }).catch(() => process.exit(1))\""
]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
env_file:
- .env
db:
image: mongo:8
restart: unless-stopped
volumes:
- db_data:/data/db
tmpfs:
- /data/configdb
redis:
image: redis:8-alpine
restart: unless-stopped
volumes:
- redis_data:/data
volumes:
db_data:
redis_data: