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