-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yaml
99 lines (93 loc) · 2.39 KB
/
docker-compose.yaml
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
90
91
92
93
94
95
96
97
98
99
version: '3.3'
services:
redis-master-1:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.2
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: master
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
redis-master-2:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.3
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: master
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
redis-master-3:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.4
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: master
MASTER_LIST: "10.5.0.2:6379 10.5.0.3:6379 10.5.0.4:6379"
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
redis-slave-1:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.5
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: slave
SLAVE_IP: "10.5.0.5:6379"
MASTER_IP: "10.5.0.2:6379"
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
redis-slave-2:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.6
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: slave
SLAVE_IP: "10.5.0.6:6379"
MASTER_IP: "10.5.0.3:6379"
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
redis-slave-3:
image: opstree/redis:1.0
restart: always
networks:
redis:
ipv4_address: 10.5.0.7
environment:
REDIS_PASSWORD: "Opstree@12345"
SETUP_MODE: cluster
SERVER_MODE: slave
SLAVE_IP: "10.5.0.7:6379"
MASTER_IP: "10.5.0.4:6379"
PERSISTENCE_ENABLED: "true"
healthcheck:
test: ["CMD-SHELL", "/bin/bash /usr/bin/healthcheck.sh"]
networks:
redis:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16