-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.yml
59 lines (58 loc) · 1.36 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
version: '3.7'
services:
mongo0:
hostname: mongo0
container_name: mongo0
image: mongo:latest
expose:
- 30000
ports:
- 30000:30000
volumes:
- 'mongodb_repl_data1:/data/db:z'
restart: always
command: "--bind_ip_all --replSet rs0 --port 30000"
mongo1:
hostname: mongo1
container_name: mongo1
image: mongo:latest
expose:
- 30001
ports:
- 30001:30001
volumes:
- 'mongodb_repl_data2:/data/db:z'
restart: always
command: "--bind_ip_all --replSet rs0 --port 30001"
mongo2:
hostname: mongo2
container_name: mongo2
image: mongo:latest
expose:
- 30002
ports:
- 30002:30002
volumes:
- 'mongodb_repl_data3:/data/db:z'
restart: always
command: "--bind_ip_all --replSet rs0 --port 30002"
redis-starter:
image: 'docker.io/bitnami/redis:6.0-debian-10'
container_name: redis-starter
restart: always
environment:
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
command: /bin/sh -c "redis-server --requirepass ${REDIS_PASSWORD}"
ports:
- '6379:6379'
volumes:
- 'redis_data:/bitnami/redis-starter/data'
volumes:
mongodb_repl_data1:
external: true
mongodb_repl_data2:
external: true
mongodb_repl_data3:
external: true
redis_data:
driver: local