-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
57 lines (50 loc) · 1.52 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
version: '3.8'
networks:
idempotent-requests:
name: idempotent-requests
volumes:
shard0_data:
driver: local
cfg_data:
driver: local
services:
mongodb-sharded:
image: 'docker.io/bitnami/mongodb-sharded:5.0-debian-10'
environment:
MONGODB_ADVERTISED_HOSTNAME: "mongodb-sharded"
MONGODB_SHARDING_MODE: "mongos"
MONGODB_CFG_PRIMARY_HOST: "mongodb-cfg"
MONGODB_CFG_REPLICA_SET_NAME: "cfgreplicaset"
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
MONGODB_ROOT_PASSWORD: "password123"
ports:
- "27017:27017"
networks:
idempotent-requests:
mongodb-shard0:
image: 'docker.io/bitnami/mongodb-sharded:5.0-debian-10'
environment:
MONGODB_ADVERTISED_HOSTNAME: "mongodb-shard0"
MONGODB_SHARDING_MODE: "shardsvr"
MONGODB_MONGOS_HOST: "mongodb-sharded"
MONGODB_ROOT_PASSWORD: "password123"
MONGODB_REPLICA_SET_MODE: "primary"
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
MONGODB_REPLICA_SET_NAME: "shard0"
volumes:
- 'shard0_data:/bitnami'
networks:
idempotent-requests:
mongodb-cfg:
image: 'docker.io/bitnami/mongodb-sharded:5.0-debian-10'
environment:
MONGODB_ADVERTISED_HOSTNAME: "mongodb-cfg"
MONGODB_SHARDING_MODE: "configsvr"
MONGODB_ROOT_PASSWORD: "password123"
MONGODB_REPLICA_SET_MODE: "primary"
MONGODB_REPLICA_SET_KEY: "replicasetkey123"
MONGODB_REPLICA_SET_NAME: "cfgreplicaset"
volumes:
- 'cfg_data:/bitnami'
networks:
idempotent-requests: