-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (44 loc) · 1.01 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
x-common-variables:
MONGO_IMAGE: &mongo_image mongo:6
services:
mongo1:
container_name: mongo1
hostname: mongo1
image: *mongo_image
restart: always
volumes:
- mongovol1:/data/db
- ./db-fixtures:/opt/fixtures
- ./local/scripts:/opt/scripts
ports:
- "27017:27017"
command: mongod --replSet mstream_db_replica_set --bind_ip_all
mongo2:
container_name: mongo2
hostname: mongo2
image: *mongo_image
restart: always
volumes:
- mongovol2:/data/db
- ./db-fixtures:/opt/fixtures
ports:
- "27018:27017"
command: mongod --replSet mstream_db_replica_set --bind_ip_all
mongo3:
container_name: mongo3
hostname: mongo3
image: *mongo_image
restart: always
volumes:
- mongovol3:/data/db
- ./db-fixtures:/opt/fixtures
ports:
- "27019:27017"
command: mongod --replSet mstream_db_replica_set --bind_ip_all
networks:
mongoCluster:
name: mongoCluster
volumes:
mongovol1:
mongovol2:
mongovol3: