-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (89 loc) · 1.98 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.4'
services:
redis:
image: redis:alpine
container_name: redis
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/master:/data
command: redis-server /usr/local/etc/redis/conf/master.conf
ports:
- "6379:6379"
networks:
- backend
slave-1:
image: redis:alpine
container_name: slave-1
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/slave-1:/data
command: redis-server /usr/local/etc/redis/conf/slave-1.conf
ports:
- "6380:6380"
links:
- redis
networks:
- backend
slave-2:
image: redis:alpine
container_name: slave-2
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/slave-2:/data
command: redis-server /usr/local/etc/redis/conf/slave-2.conf
ports:
- "6381:6381"
networks:
- backend
sentinel-1:
image: redis:alpine
container_name: sentinel-1
command: redis-sentinel /usr/local/etc/redis/conf/sentinel-1.conf
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/sentinel-1:/data
ports:
- "26379:26379"
networks:
- backend
links:
- redis
- slave-1
sentinel-2:
image: redis:alpine
container_name: sentinel-2
command: redis-sentinel /usr/local/etc/redis/conf/sentinel-2.conf
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/sentinel-2:/data
ports:
- "26380:26380"
networks:
- backend
sentinel-3:
image: redis:alpine
container_name: sentinel-3
command: redis-sentinel /usr/local/etc/redis/conf/sentinel-3.conf
restart: always
tty: true
volumes:
- ./conf:/usr/local/etc/redis/conf
- ./data/sentinel-3:/data
ports:
- "26381:26381"
networks:
- backend
networks:
backend:
name: backend
driver: bridge