-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 952 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
version: "3.7"
networks:
mongo_net:
driver: bridge
name: mongo-replica-set-cluster
services:
m1:
image: mongo:6.0
container_name: m1
hostname: m1
networks:
- mongo_net
ports:
- "2001:27017"
volumes:
- .mongo/m1:/data/db
- ./entrypoint.sh:/entrypoint.sh
command: mongod --replSet mongoSet --bind_ip_all
restart: always
m2:
image: mongo:6.0
container_name: m2
hostname: m2
networks:
- mongo_net
ports:
- "2002:27017"
volumes:
- .mongo/m2:/data/db
- ./entrypoint.sh:/entrypoint.sh
command: mongod --replSet mongoSet --bind_ip_all
restart: always
m3:
image: mongo:6.0
container_name: m3
hostname: m3
networks:
- mongo_net
ports:
- "2003:27017"
volumes:
- .mongo/m3:/data/db
- ./entrypoint.sh:/entrypoint.sh
command: mongod --replSet mongoSet --bind_ip_all
restart: always