-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
56 lines (51 loc) · 1.4 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
version: '3.3'
services:
redis_master:
image: redis:5.0.5-alpine
networks:
redis5:
ipv4_address: 172.21.0.5
command: redis-server --requirepass abc --masterauth abc
redis_slave:
image: redis:5.0.5-alpine
networks:
redis5:
ipv4_address: 172.21.0.10
command: redis-server --requirepass abc --masterauth abc --slaveof redis_master 6379
depends_on:
- redis_master
sentinel1:
image: pgeraghty/redis-sentinel:5.0.5
networks:
redis5:
ipv4_address: 172.21.0.15
environment:
- MASTER_NAME=the-master
- QUORUM=1
- MASTER=redis_master
- DOWN_AFTER=5000
- FAILOVER_TIMEOUT=60000
- AUTH_PASS=abc
- REQUIRE_PASS=abcd
depends_on:
- redis_master
sentinel2:
image: pgeraghty/redis-sentinel:5.0.5
networks:
redis5:
ipv4_address: 172.21.0.20
environment:
- MASTER_NAME=the-master
- QUORUM=1
- MASTER=redis_master
- DOWN_AFTER=5000
- FAILOVER_TIMEOUT=60000
- AUTH_PASS=abc
- REQUIRE_PASS=abcd
depends_on:
- redis_master
networks:
redis5:
ipam:
config:
- subnet: 172.21.0.0/24