-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
50 lines (48 loc) · 1.02 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
version: "3"
services:
mongo1:
hostname: mongo1
container_name: mongo1
image: mongo:5.0.6
expose:
- 27017
ports:
- 27011:27017
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
networks:
- replset-network
volumes:
- ./data/db1:/data/db
- ./init.sh:/scripts/init.sh
mongo2:
hostname: mongo2
container_name: mongo2
image: mongo:5.0.6
expose:
- 27017
ports:
- 27012:27017
restart: always
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
networks:
- replset-network
volumes:
- ./data/db2:/data/db
mongo3:
hostname: mongo3
container_name: mongo3
image: mongo:5.0.6
expose:
- 27017
ports:
- 27013:27017
restart: always
networks:
- replset-network
entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "rs0" ]
volumes:
- ./data/db3:/data/db
networks:
replset-network:
driver: bridge