-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.cnf.yml
50 lines (46 loc) · 1.46 KB
/
docker-compose.cnf.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
version: '3'
services:
mongo-cnf-2:
container_name: "mongo-cnf-2"
image: mongo:4.0.1
ports:
- "30102:27017"
command: mongod --replSet cnf-serv --configsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
restart: always
mongo-cnf-3:
container_name: "mongo-cnf-3"
image: mongo:4.0.1
ports:
- "30103:27017"
command: mongod --replSet cnf-serv --configsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
restart: always
mongo-cnf-1:
container_name: "mongo-cnf-1"
image: mongo:4.0.1
ports:
- "30101:27017"
command: mongod --replSet cnf-serv --configsvr --port 27017 --oplogSize 16 --noprealloc --smallfiles
links:
- mongo-cnf-2:mongo-cnf-2
- mongo-cnf-3:mongo-cnf-3
restart: always
mongo-cnf-setup:
container_name: "mongo-cnf-setup"
image: mongo:4.0.1
depends_on:
- "mongo-cnf-1"
- "mongo-cnf-2"
- "mongo-cnf-3"
links:
- mongo-cnf-1:mongo-cnf-1
- mongo-cnf-2:mongo-cnf-2
- mongo-cnf-3:mongo-cnf-3
volumes:
- ./scripts:/scripts
environment:
- MONGO1=mongo-cnf-1
- MONGO2=mongo-cnf-2
- MONGO3=mongo-cnf-3
- RS=cnf-serv
- PORT=27017
entrypoint: [ "/scripts/setup-cnf.sh" ]