-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
64 lines (59 loc) · 1.86 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
version: '3.4'
services:
master:
image: redis
container_name: redis-master
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --port 7000 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7000:7000
volumes:
- ./data7000:/data
slave1:
image: redis
container_name: redis-slave1
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --slaveof x.x.x.x 7000 --port 7001 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7001:7001
volumes:
- ./data7001:/data
slave2:
image: redis
container_name: redis-slave2
restart: always
command: redis-server --bind 0.0.0.0 --protected-mode no --slaveof x.x.x.x 7000 --port 7002 --daemonize no --requirepass mypassword --masterauth mypassword --appendonly yes --logfile "redis.log" --dir ./
ports:
- 7002:7002
volumes:
- ./data7002:/data
sentinel1:
image: redis
container_name: sentinel1
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26379:26379
volumes:
- ./sentinel26379:/data
- ./sentinel26379.conf:/etc/redis/sentinel.conf
sentinel2:
image: redis
container_name: sentinel2
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26380:26380
volumes:
- ./sentinel26380:/data
- ./sentinel26380.conf:/etc/redis/sentinel.conf
sentinel3:
image: redis
container_name: sentinel3
restart: always
command: redis-sentinel /etc/redis/sentinel.conf
ports:
- 26381:26381
volumes:
- ./sentinel26381:/data
- ./sentinel26381.conf:/etc/redis/sentinel.conf