-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose2.yaml
55 lines (51 loc) · 1.15 KB
/
docker-compose2.yaml
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
version: "3.7"
services:
# Config Server
cfgsvr2:
container_name: cfgsvr2
image: mongo:4.0.12
restart: always
command: mongod --configsvr --replSet cfgrs --port 27017 --dbpath /data/db
ports:
- 40002:27017
volumes:
- cfgsvr2:/data/db
# Sharding1-rs2
shard1svr2:
container_name: shard1svr2
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard1rs --port 27017 --dbpath /data/db
ports:
- 50012:27017
volumes:
- shard1svr2:/data/db
# Sharding2-rs2
shard2svr2:
container_name: shard2svr2
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard2rs --port 27017 --dbpath /data/db
ports:
- 50022:27017
volumes:
- shard2svr2:/data/db
# Sharding3-rs2
shard3svr2:
container_name: shard3svr2
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard3rs --port 27017 --dbpath /data/db
ports:
- 50032:27017
volumes:
- shard3svr2:/data/db
volumes:
# Config
cfgsvr2:
# Sharding1
shard1svr2:
# Sharding2
shard2svr2:
# Sharding3
shard3svr2: