-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
55 lines (52 loc) · 1.14 KB
/
compose.yaml
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
services:
patient-web:
restart: always
init: true
build:
context: .
environment:
- ROOT_URL=${ROOT_URL}
- PORT=${PORT}
- MONGO_URL=${MONGO_URL}
- HTTP_FORWARDED_COUNT=${HTTP_FORWARDED_COUNT}
depends_on:
patient-db:
condition: service_healthy
networks:
- patient-network
ports:
- "${PORT}:${PORT}"
patient-db:
restart: always
image: "mongo:${MONGO_VERSION}"
volumes:
- patient-data:/data/db
- ./scripts/assert-replica-set.js:/scripts/assert-replica-set.js
networks:
- patient-network
logging:
driver: "json-file"
options:
max-size: "100m"
max-file: "7"
command: [
"--bind_ip", "localhost,patient-db",
"--dbpath", "/data/db",
"--replSet", "meteor"
]
healthcheck:
test: [
"CMD",
"mongosh",
"--eval", "replSet = 'meteor'; hostname = 'patient-db'",
"/scripts/assert-replica-set.js"
]
start_period: 40s
start_interval: 2s
interval: 1m30s
timeout: 10s
retries: 3
networks:
patient-network:
volumes:
patient-data: