-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
65 lines (58 loc) · 1.59 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
version: '3'
services:
redis-master:
image: redis:3
command: redis-server
redis-slave-1:
image: redis:3
command: redis-server --slaveof redis-master 6379
links:
- redis-master
redis-slave-2:
image: redis:3
command: redis-server --slaveof redis-master 6379
links:
- redis-master
sentinel-1:
build: sentinel
environment:
- SENTINEL_DOWN_AFTER=5000
- SENTINEL_FAILOVER=500
- SENTINEL_QUORUM=2
depends_on:
- redis-master
- redis-slave-1
- redis-slave-2
sentinel-2:
build: sentinel
environment:
- SENTINEL_DOWN_AFTER=5000
- SENTINEL_FAILOVER=500
- SENTINEL_QUORUM=2
depends_on:
- redis-master
- redis-slave-1
- redis-slave-2
sentinel-3:
build: sentinel
environment:
- SENTINEL_DOWN_AFTER=5000
- SENTINEL_FAILOVER=500
- SENTINEL_QUORUM=2
depends_on:
- redis-master
- redis-slave-1
- redis-slave-2
redis_cluster_app:
build: app
environment:
- SENTINEL_DOWN_AFTER=5000
- SENTINEL_FAILOVER=500
- SENTINEL_QUORUM=2
depends_on:
- redis-master
- redis-slave-1
- redis-slave-2
command: /bin/bash -c "echo 'Waiting for redis to run..' && sleep 60 && python redis_app.py"
volumes:
- ./app:/usr/src/app/redis_app/