forked from sun-halo/docker-compose
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmongo.yml
More file actions
31 lines (31 loc) · 788 Bytes
/
mongo.yml
File metadata and controls
31 lines (31 loc) · 788 Bytes
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
version: '2'
services:
master:
image: mongo:3.6.0
hostname: master
ports:
- 27017/tcp
volumes:
- /mongo/01/db:/data/db
- /mongo/01/configdb:/data/configdb
networks:
mongodb:
aliases:
- master
command: mongod –dbpath /data/db –master
slave:
image: mongo:3.6.0
hostname: slave
ports:
- 27017/tcp
volumes:
- /mongo/02/db:/data/db
- /mongo/02/configdb:/data/configdb
networks:
mongodb:
aliases:
- slave
command: mongod –dbpath /data/db –slave –source master:27017
networks:
mongodb:
external: true