-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 1.88 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
services:
mongodb-primary:
image: bitnami/mongodb:${MONGODB_VERSION}
container_name: mongodb-primary
ports:
- 27017:27017
environment:
- MONGODB_ADVERTISED_HOSTNAME=${MONGODB_DEFAULT_HOSTS:-}
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ROOT_PASSWORD=${MONGODB_DEFAULT_PASSWORDS:-}
- MONGODB_REPLICA_SET_KEY=${MONGODB_DEFAULT_KEYS:-}
- MONGODB_ENABLE_JOURNAL=true
- MONGODB_ENABLE_IPV6=yes
volumes:
- "bitnami_data:/bitnami"
networks:
- yan
restart: unless-stopped
mongodb-secondary:
image: bitnami/mongodb:${MONGODB_VERSION}
container_name: mongodb-secondary
ports:
- 27018:27017
environment:
- MONGODB_ADVERTISED_HOSTNAME=${MONGODB_DEFAULT_HOSTS:-}
- MONGODB_REPLICA_SET_MODE=secondary
- MONGODB_INITIAL_PRIMARY_HOST=mongodb-primary
- MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
- MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=${MONGODB_DEFAULT_PASSWORDS:-}
- MONGODB_REPLICA_SET_KEY=${MONGODB_DEFAULT_KEYS:-}
- MONGODB_ENABLE_JOURNAL=true
- MONGODB_ENABLE_IPV6=yes
networks:
- yan
depends_on:
- mongodb-primary
restart: unless-stopped
mongodb-arbiter:
image: bitnami/mongodb:${MONGODB_VERSION}
container_name: mongodb-arbiter
ports:
- 27019:27017
environment:
- MONGODB_ADVERTISED_HOSTNAME=${MONGODB_DEFAULT_HOSTS:-}
- MONGODB_REPLICA_SET_MODE=arbiter
- MONGODB_INITIAL_PRIMARY_HOST=mongodb-primary
- MONGODB_INITIAL_PRIMARY_PORT_NUMBER=27017
- MONGODB_INITIAL_PRIMARY_ROOT_PASSWORD=${MONGODB_DEFAULT_PASSWORDS:-}
- MONGODB_REPLICA_SET_KEY=${MONGODB_DEFAULT_KEYS:-}
- MONGODB_ENABLE_JOURNAL=true
- MONGODB_ENABLE_IPV6=yes
networks:
- yan
depends_on:
- mongodb-primary
restart: unless-stopped
volumes:
bitnami_data:
networks:
yan:
driver: bridge