forked from singram/mongo-docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (81 loc) · 2.92 KB
/
docker-compose.yml
File metadata and controls
82 lines (81 loc) · 2.92 KB
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
81
82
version: '2'
services:
mongors1n1:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard1 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors1n1:/data/db
mongors1n2:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard1 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors1n2:/data/db
mongors1n3:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard1 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors1n3:/data/db
mongors2n1:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard2 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors2n1:/data/db
mongors2n2:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard2 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors2n2:/data/db
mongors2n3:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --shardsvr --replSet shard2 --dbpath /data/db --journal --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongors2n3:/data/db
mongocfg1:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --dbpath /data/db --configsvr --replSet cfg --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongo-cfg-1:/data/db
mongocfg2:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --dbpath /data/db --configsvr --replSet cfg --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongo-cfg-2:/data/db
mongocfg3:
image: mongo:3.4
command: mongod --noprealloc --smallfiles --dbpath /data/db --configsvr --replSet cfg --noauth --port 27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
- ./data/mongo-cfg-3:/data/db
mongos1:
image: mongo:3.4
command: mongos --configdb cfg/mongodockercompose_mongocfg1_1:27017,mongodockercompose_mongocfg2_1:27017,mongodockercompose_mongocfg3_1:27017 --port 27017
ports:
- 27017:27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro
mongos2:
image: mongo:3.4
command: mongos --configdb cfg/mongodockercompose_mongocfg1_1:27017,mongodockercompose_mongocfg2_1:27017,mongodockercompose_mongocfg3_1:27017 --port 27017
ports:
- 27018:27017
restart: always
volumes:
- /etc/localtime:/etc/localtime:ro