-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.mongo.yml
74 lines (70 loc) · 2.26 KB
/
docker-compose.mongo.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.5"
services:
mongodb-primary:
# image: 'bitnami/mongodb:latest'
image: "bitnami/mongodb:4.2-debian-9"
# image: 'bitnami/mongodb:4.0-debian-9'
# container_name: mongodb-primary
# user: root
environment:
- MONGODB_ADVERTISED_HOSTNAME=mongodb-primary
- MONGODB_ROOT_PASSWORD=password123
# - MONGODB_USERNAME=fhiruser
# - MONGODB_PASSWORD=password123
# - MONGODB_DATABASE=fhir
- MONGODB_REPLICA_SET_KEY=replicasetkey123
# - ALLOW_EMPTY_PASSWORD=yes
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_REPLICA_SET_NAME=rset
ports:
- "37017:27017"
volumes:
- "mongodb_master_data:/bitnami"
# - './mount-data//mongodb_master_data:/bitnami'
mongodb-secondary:
# image: 'bitnami/mongodb:latest'
image: "bitnami/mongodb:4.2-debian-9"
# image: 'bitnami/mongodb:4.0-debian-9'
# container_name: mongodb-secondary
# user: root
depends_on:
- mongodb-primary
environment:
- MONGODB_ADVERTISED_HOSTNAME=mongodb-secondary
- MONGODB_PRIMARY_ROOT_PASSWORD=password123
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_REPLICA_SET_MODE=secondary
- MONGODB_PRIMARY_HOST=mongodb-primary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_REPLICA_SET_NAME=rset
ports:
- "37018:27017"
volumes:
- "mongodb_secondary_data:/bitnami"
# - './mount-data//mongodb_secondary_data:/bitnami'
mongodb-arbiter:
# image: 'bitnami/mongodb:latest'
image: "bitnami/mongodb:4.2-debian-9"
# image: 'bitnami/mongodb:4.0-debian-9'
# container_name: mongodb-arbiter
# user: root
depends_on:
- mongodb-primary
environment:
- MONGODB_ADVERTISED_HOSTNAME=mongodb-arbiter
- MONGODB_PRIMARY_ROOT_PASSWORD=password123
- MONGODB_REPLICA_SET_KEY=replicasetkey123
# - MONGODB_REPLICA_SET_MODE=secondary
- MONGODB_REPLICA_SET_MODE=arbiter
- MONGODB_PRIMARY_HOST=mongodb-primary
- MONGODB_PRIMARY_PORT_NUMBER=27017
- MONGODB_REPLICA_SET_NAME=rset
ports:
- "37019:27017"
volumes:
- "mongodb_arbiter_data:/bitnami"
# - './mount-data/mongodb_arbiter_data:/bitnami'
volumes:
mongodb_master_data:
mongodb_secondary_data:
mongodb_arbiter_data: