-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
37 lines (36 loc) · 1001 Bytes
/
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
version: "3.4"
services:
kort:
container_name: kort
restart: always
build: .
ports:
- "3000:3000"
# this makes sure mongo is up before kort starts, apparently this feature may be removed in tbe future
# https://docs.docker.com/compose/compose-file/#links
links:
- mongo
# https://stackoverflow.com/questions/40873165/use-docker-run-command-to-pass-arguments-to-cmd-in-dockerfile
environment:
- mongoHost=mongo
# https://docs.docker.com/compose/compose-file/#healthcheck
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 3s
mongo:
container_name: mongo
restart: always
image: mongo
volumes:
- ./data:/data/db
ports:
- "27017:27017"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 5s