-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose1.yaml
56 lines (51 loc) · 1.15 KB
/
docker-compose1.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
cfgsvr1:
container_name: cfgsvr1
image: mongo:4.0.12
restart: always
command: mongod --configsvr --replSet cfgrs --port 27017 --dbpath /data/db
ports:
- 40001:27017
volumes:
- cfgsvr1:/data/db
# Sharding1-rs1
shard1svr1:
container_name: shard1svr1
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard1rs --port 27017 --dbpath /data/db
ports:
- 50011:27017
volumes:
- shard1svr1:/data/db
# Sharding2-rs1
shard2svr1:
container_name: shard2svr1
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard2rs --port 27017 --dbpath /data/db
ports:
- 50021:27017
volumes:
- shard2svr1:/data/db
# Sharding3-rs1
shard3svr1:
container_name: shard3svr1
image: mongo:4.0.12
restart: always
command: mongod --shardsvr --replSet shard3rs --port 27017 --dbpath /data/db
ports:
- 50031:27017
volumes:
- shard3svr1:/data/db
volumes:
# Config
cfgsvr1:
# Sharding1
shard1svr1:
# Sharding2
shard2svr1:
# Sharding3
shard3svr1: