-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
53 lines (48 loc) · 1002 Bytes
/
docker-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
version: "3.7"
volumes:
mongodb:
logs:
networks:
nmma:
services:
app:
build:
context: .
dockerfile: Dockerfile
image: theodlz/nmma_api:latest
volumes:
- logs:/app/logs
expose:
- "4000"
# fixme:
ports:
- "4000:4000"
links:
- mongo:nmma-mongo
restart: always
depends_on:
- mongo
networks:
- nmma
mongo:
image: mongo:7.0
hostname: mongo
expose:
- "27017"
# fixme:
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=mongoadmin
- MONGO_INITDB_ROOT_PASSWORD=mongoadminsecret
#- MONGO_REPLICA_SET_NAME=rs0
volumes:
- mongodb:/data/db
restart: always
networks:
- nmma
healthcheck:
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo -u $${MONGO_INITDB_ROOT_USERNAME} -p $${MONGO_INITDB_ROOT_PASSWORD} --quiet) -eq 1
interval: 10s
start_period: 20s
command: [ "--bind_ip_all" ]