-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (77 loc) · 2.47 KB
/
docker-compose.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3'
services:
## Config Servers
config01:
image: mongo:6.0.2
command: mongod --port 27017 --configsvr --replSet configserver --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
config02:
image: mongo:6.0.2
command: mongod --port 27017 --configsvr --replSet configserver --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
config03:
image: mongo:6.0.2
command: mongod --port 27017 --configsvr --replSet configserver --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
## Shards
shard01a:
image: mongo:6.0.2
command: mongod --port 27018 --shardsvr --replSet shard01 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
shard01b:
image: mongo:6.0.2
command: mongod --port 27018 --shardsvr --replSet shard01 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
shard02a:
image: mongo:6.0.2
command: mongod --port 27019 --shardsvr --replSet shard02 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
shard02b:
image: mongo:6.0.2
command: mongod --port 27019 --shardsvr --replSet shard02 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
shard03a:
image: mongo:6.0.2
command: mongod --port 27020 --shardsvr --replSet shard03 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
shard03b:
image: mongo:6.0.2
command: mongod --port 27020 --shardsvr --replSet shard03 --keyFile /srv/mongosecret --dbpath /data/db
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
## Router
router:
image: mongo:6.0.2
command: mongos --port 27017 --configdb configserver/config01:27017,config02:27017,config03:27017 --bind_ip_all --keyFile /srv/mongosecret
ports:
- "27017:27017"
volumes:
- ./scripts:/scripts
- ./mongosecret:/srv/mongosecret
depends_on:
- config01
- config02
- config03
- shard01a
- shard01b
- shard02a
- shard02b
- shard03a
- shard03b