-
Notifications
You must be signed in to change notification settings - Fork 100
/
docker-compose.2.yml
50 lines (45 loc) · 1.37 KB
/
docker-compose.2.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
version: '3'
services:
mongo-2-2:
container_name: "mongo-2-2"
image: mongo:4.0.1
ports:
- "30022:27017"
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
restart: always
mongo-2-3:
container_name: "mongo-2-3"
image: mongo:4.0.1
ports:
- "30023:27017"
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
restart: always
mongo-2-1:
container_name: "mongo-2-1"
image: mongo:4.0.1
ports:
- "30021:27017"
command: mongod --replSet rs2 --shardsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
links:
- mongo-2-2:mongo-2-2
- mongo-2-3:mongo-2-3
restart: always
mongo-rs2-setup:
container_name: "mongo-rs2-setup"
image: mongo:4.0.1
depends_on:
- "mongo-2-1"
- "mongo-2-2"
- "mongo-2-3"
links:
- mongo-2-1:mongo-2-1
- mongo-2-2:mongo-2-2
- mongo-2-3:mongo-2-3
volumes:
- ./scripts:/scripts
environment:
- MONGO1=mongo-2-1
- MONGO2=mongo-2-2
- MONGO3=mongo-2-3
- RS=rs2
entrypoint: [ "/scripts/setup.sh" ]