forked from sunbenxin/oscm
-
Notifications
You must be signed in to change notification settings - Fork 26
/
redis-master-slave.yaml
102 lines (102 loc) · 2.02 KB
/
redis-master-slave.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
100
101
102
services:
master:
command:
- --requirepass 11223344
- --appendonly yes
container_name: master
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6379:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/master:/data
slave-0:
command:
- --slaveof master 6379
- --masterauth 11223344
- --requirepass 11223344
- --appendonly yes
container_name: slave-0
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6380:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/slave0:/data
slave-1:
command:
- --slaveof master 6379
- --masterauth 11223344
- --requirepass 11223344
- --appendonly yes
container_name: slave-1
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6381:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/slave1:/data
slave-2:
command:
- --slaveof master 6379
- --masterauth 11223344
- --requirepass 11223344
- --appendonly yes
container_name: slave-2
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6382:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/slave2:/data
slave-3:
command:
- --slaveof master 6379
- --masterauth 11223344
- --requirepass 11223344
- --appendonly yes
container_name: slave-3
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6383:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/slave3:/data
slave-4:
command:
- --slaveof master 6379
- --masterauth 11223344
- --requirepass 11223344
- --appendonly yes
container_name: slave-4
environment:
- TZ=Asia/Shanghai
image: redis:latest
ports:
- 6384:6379
restart: always
sysctls:
- net.core.somaxconn=1024
volumes:
- /tmp/slave4:/data
version: '3.9'