-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-docker-compose.yml
More file actions
44 lines (42 loc) · 1.09 KB
/
test-docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.09 KB
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
version: '3.1'
services:
mongodb-primary:
image: mongo:5
ports:
- "${MONGO_PRIMARY_PORT:-27017}:27017"
volumes:
- ./mongo:/data/db
container_name: "mongodb-primary"
restart: always
command: mongod --replSet rs0 --bind_ip localhost,mongodb-primary
networks:
- mongocluster
mongodb-secondary-read:
image: mongo:5
ports:
- "${MONGO_SECONDARY_READ_PORT:-27018}:27017"
volumes:
- ./mongo-secondary-read:/data/db
container_name: "mongodb-secondary-read"
restart: always
command: mongod --replSet rs0 --bind_ip localhost,mongodb-secondary-read
networks:
- mongocluster
depends_on:
- mongodb-primary
mongodb-secondary-rw:
image: mongo:5
ports:
- "${MONGO_SECONDARY_RW_PORT:-27019}:27017"
volumes:
- ./mongo-secondary-rw:/data/db
container_name: "mongodb-secondary-rw"
restart: always
command: mongod --replSet rs0 --bind_ip localhost,mongodb-secondary-rw
networks:
- mongocluster
depends_on:
- mongodb-primary
networks:
mongocluster:
driver: bridge