generated from pukuba/graphql-ts-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
62 lines (61 loc) · 1.61 KB
/
docker-compose.yml
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
version: "3.7"
services:
express:
deploy:
resources:
limits:
cpus: "1"
memory: "2g"
mode: replicated
replicas: 2
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:4000/.well-known/apollo/server-health",
]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
container_name: express
image: was:latest
restart: "unless-stopped"
depends_on:
- proxy
redis_db:
image: redis:latest
container_name: redis_db
restart: "unless-stopped"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
timeout: 3s
retries: 30
proxy:
image: nginx:latest
container_name: proxy
ports:
- "80:80"
deploy:
placement:
constraints:
- "node.role==manager"
resources:
limits:
memory: "4g"
reservations:
memory: "1g"
mode: replicated
replicas: 1
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf
restart: "unless-stopped"
healthcheck:
test: curl --fail http://localhost/nginx-health || exit 1
interval: 10s
timeout: 5s
retries: 3
start_period: 10s