-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
51 lines (46 loc) · 899 Bytes
/
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
# Docker Compose Version
version: '3'
# Service Conf
services:
node1:
image: mongo
ports:
- 3001:27017
volumes:
- $HOME/mongoclusterdata/node1:/data/mongodb
networks:
- mongo-network
command: mongod --replSet rs-lab-01
node2:
image: mongo
ports:
- 3002:27017
volumes:
- $HOME/mongoclusterdata/node2:/data/mongodb
networks:
- mongo-network
command: mongod --replSet rs-lab-01
depends_on:
- node1
node3:
image: mongo
ports:
- 3003:27017
volumes:
- $HOME/mongoclusterdata/node3:/data/mongodb
networks:
- mongo-network
command: mongod --replSet rs-lab-01
depends_on:
- node2
setup-rs:
image: "setup-rs"
networks:
- mongo-network
build: ./setup
depends_on:
- node1
# Network Conf
networks:
mongo-network:
driver: bridge