-
Notifications
You must be signed in to change notification settings - Fork 28
/
docker-compose-mongo-only.yml
57 lines (51 loc) · 1.07 KB
/
docker-compose-mongo-only.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
version: '3'
services:
mongo:
image: "${PLATFORM}mongo:${MONGO}"
volumes:
- tockmongo:/data/db
ports:
- "27017:27017"
command: --bind_ip_all --port 27017 --replSet "tock"
mongo2:
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- mongo
volumes:
- tockmongo2:/data/db
ports:
- "27018:27018"
command: --bind_ip_all --port 27018 --replSet "tock"
mongo3:
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- mongo
- mongo2
volumes:
- tockmongo3:/data/db
ports:
- "27019:27019"
command: --bind_ip_all --port 27019 --replSet "tock"
mongo-setup:
container_name: "mongo-setup"
image: "${PLATFORM}mongo:${MONGO}"
depends_on:
- "mongo"
- "mongo2"
- "mongo3"
links:
- mongo:mongo
- mongo2:mongo2
- mongo3:mongo3
volumes:
- ./scripts:/scripts
environment:
- MONGO1=mongo
- MONGO2=mongo2
- MONGO3=mongo3
- RS=tock
entrypoint: [ "/scripts/setup.sh" ]
volumes:
tockmongo:
tockmongo2:
tockmongo3: