forked from alefiori82/mongo-replica-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (42 loc) · 1.16 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
version: '3'
services:
mongodb1:
image: mongo:4
restart: always
container_name: mongodb1
volumes:
- mongodata1:/data/db
expose:
- "27017"
entrypoint: [ "/usr/bin/mongod", "--replSet", "rsmongo", "--bind_ip_all", "--wiredTigerCacheSizeGB", "1"]
mongodb2:
image: mongo:4
restart: always
container_name: mongodb2
volumes:
- mongodata2:/data/db
expose:
- "27017"
entrypoint: [ "/usr/bin/mongod", "--replSet", "rsmongo", "--bind_ip_all", "--wiredTigerCacheSizeGB", "1"]
mongodb3:
image: mongo:4
restart: always
container_name: mongodb3
volumes:
- mongodata3:/data/db
expose:
- "27017"
entrypoint: [ "/usr/bin/mongod", "--replSet", "rsmongo", "--bind_ip_all", "--wiredTigerCacheSizeGB", "1" ]
mongosetup:
image: "mongo-setup"
build: "./mongo-setup"
container_name: "mongosetup"
depends_on:
- mongodb1
volumes:
- mongostatus:/data/
volumes:
mongodata1:
mongodata2:
mongodata3:
mongostatus: