-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
55 lines (55 loc) · 1.26 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
version: "3.7"
services:
opentmi:
build:
context: .
args:
- NODE_ENV=production
volumes:
- data-volume:/app/data
ports:
- "80:8000"
environment:
- NODE_ENV=production
- db=mongodb://mongo/opentmi
command: "npm start -- -vvv --listen 0.0.0.0 --port 8000"
restart: on-failure
depends_on:
- mongo
healthcheck:
test: ["CMD", "npm", "run", "healthcheck"]
interval: 1m30s
timeout: 5s
retries: 3
start_period: 40s
mongo:
image: mongo:4.1.2
ports:
- "27017:27017"
volumes:
- db-volume:/data/db
environment:
#- MONGO_INITDB_ROOT_USERNAME=root
#- MONGO_INITDB_ROOT_PASSWORD=example
- MONGO_INITDB_DATABASE=opentmi
healthcheck:
test: "[ `echo 'db.runCommand(\"ping\").ok' | mongo localhost/opentmi --quiet` ] && echo 0 || echo 1"
interval: 5s
start_period: 10s
timeout: 4s
retries: 3
# SSL termination for HTTPS
#nginx-ssl-proxy:
# image: danieldent/nginx-ssl-proxy
# restart: always
# environment:
# UPSTREAM: opentmi:8000
# SERVERNAME: my.server.com
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - "/etc/letsencrypt"
volumes:
db-volume:
data-volume: