-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-mongors.3.yml
47 lines (43 loc) · 1.48 KB
/
docker-compose-mongors.3.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
services:
mongo-rs-1-1:
container_name: "mongo-1-1"
image: mongobuild
ports:
- "30201:27017"
command: mongod --replSet rs-1 --port 27017 --nojournal --oplogSize 16 --noprealloc --smallfiles
links:
- mongo-rs-1-2:mongo-rs-1-2
- mongo-rs-1-3:mongo-rs-1-3
restart: "always
mongo-rs-1-2:
container_name:"mongo-rs-1-2"
image: mongobuild
ports:
- "30202:27017"
command: mongod --replSet rs-1 --port 27017 --nojournal --oplogSize 16 --noprealloc --smallfiles
restart: "always"
mongo-rs-1-3:
container_name:"mongo-rs-1-3"
image: mongobuild
ports:
- "30203:27017"
command: mongod --replSet rs-1 --port 27017 --nojournal --oplogSize 16 --noprealloc --smallfiles
restart: "always"
mongo-rs-1-setup:
container_name: "mongo-rs-1-setup"
image: mongobuild
depends_on:
- "mongo-rs-1-1"
- "mongo-rs-1-2"
- "mongo-rs-1-3"
links:
- mongo-rs-1-1:mongo-rs-1-1
- mongo-rs-1-2:mongo-rs-1-2
- mongo-rs-1-3:mongo-rs-1-3
volumes:
- ./replication:/replication
environment:
- MONGO1=mongo-rs-1-1
- MONGO2=mongo-rs-1-2
- MONGO3=mongo-rs-1-3
entrypoint: [ "/replication/setup-rs-3.sh" ]"