-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose3.yaml
56 lines (51 loc) · 1.15 KB
/
docker-compose3.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
56
version: "3.7"
services:
# Config Server
cfgsvr3:
container_name: cfgsvr3
image: mongo:4.0.12
restart: always
command: mongod --configsvr --replSet cfgrs --port 27017 --dbpath /data/db
ports:
- 40003:27017
volumes:
- cfgsvr3:/data/db
# Sharding1-rs3
shard1svr3:
container_name: shard1svr3
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard1rs --port 27017 --dbpath /data/db
ports:
- 50013:27017
volumes:
- shard1svr3:/data/db
# Sharding2-rs3
shard2svr3:
container_name: shard2svr3
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard2rs --port 27017 --dbpath /data/db
ports:
- 50023:27017
volumes:
- shard2svr3:/data/db
# Sharding3-rs3
shard3svr3:
container_name: shard3svr3
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard3rs --port 27017 --dbpath /data/db
ports:
- 50033:27017
volumes:
- shard3svr3:/data/db
volumes:
# Config
cfgsvr3:
# Sharding1
shard1svr3:
# Sharding2
shard2svr3:
# Sharding3
shard3svr3: