-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yml
332 lines (331 loc) · 15.7 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
version: '3.2'
services:
# redis sentinel
redis-sentinel-master:
image: "redis:${REDIS_SENTINEL_VERSION:-latest}"
command: redis-server --port 6380 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '6380:6380'
redis-sentinel-slave:
image: "redis:${REDIS_SENTINEL_VERSION:-latest}"
depends_on: [redis-sentinel-master]
command: redis-server --port 6381 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --slaveof ${HOST_IP} 6380 --slave-announce-ip ${HOST_IP}
ports:
- '6381:6381'
redis-sentinel:
image: "bitnami/redis-sentinel:${REDIS_SENTINEL_VERSION:-latest}"
depends_on: [redis-sentinel-slave]
environment:
- REDIS_MASTER_HOST=${HOST_IP}
- REDIS_MASTER_PORT_NUMBER=6380
- REDIS_SENTINEL_QUORUM=1
ports:
- '26379:26379'
redis-sentinel-master-auth:
image: "redis:${REDIS_SENTINEL_VERSION:-latest}"
command: redis-server --port 6382 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --requirepass sekret
ports:
- '6382:6382'
redis-sentinel-slave-auth:
image: "redis:${REDIS_SENTINEL_VERSION:-latest}"
depends_on: [redis-sentinel-master-auth]
command: redis-server --port 6383 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --slaveof ${HOST_IP} 6382 --slave-announce-ip ${HOST_IP} --requirepass sekret --masterauth sekret
ports:
- '6383:6383'
redis-sentinel-auth:
image: "bitnami/redis-sentinel:${REDIS_SENTINEL_VERSION:-latest}"
depends_on: [redis-sentinel-slave-auth]
environment:
- REDIS_MASTER_HOST=${HOST_IP}
- REDIS_MASTER_PASSWORD=sekret
- REDIS_MASTER_PORT_NUMBER=6382
- REDIS_SENTINEL_PASSWORD=sekret
ports:
- '36379:26379'
# cluster with replication
redis-cluster-1:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7000 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '7000:7000'
- '17000:17000'
redis-cluster-2:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7001 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [redis-cluster-1]
ports:
- '7001:7001'
- '17001:17001'
redis-cluster-3:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7002 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '7002:7002'
- '17002:17002'
redis-cluster-4:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7003 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [redis-cluster-3]
ports:
- '7003:7003'
- '17003:17003'
redis-cluster-5:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7004 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '7004:7004'
- '17004:17004'
redis-cluster-6:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 7005 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [redis-cluster-5]
ports:
- '7005:7005'
- '17005:17005'
redis-cluster-init:
image: "redis:${REDIS_VERSION:-latest}"
command: bash -c "echo yes | redis-cli --cluster create --cluster-replicas 1 ${HOST_IP}:7000 ${HOST_IP}:7001 ${HOST_IP}:7002 ${HOST_IP}:7003 ${HOST_IP}:7004 ${HOST_IP}:7005"
depends_on: [redis-cluster-1, redis-cluster-2, redis-cluster-3, redis-cluster-4, redis-cluster-5, redis-cluster-6]
# ssl cluster with replication
redis-ssl-cluster-1:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8301 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8301:8301'
- '18301:18301'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-2:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8302 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8302:8302'
- '18302:18302'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-3:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8303 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8303:8303'
- '18303:18303'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-4:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8304 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8304:8304'
- '18304:18304'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-5:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8305 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8305:8305'
- '18305:18305'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-6:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 0 --tls-port 8306 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-replication yes --tls-cluster yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8306:8306'
- '18306:18306'
volumes:
- ./tests/tls:/tls
redis-ssl-cluster-init:
image: "redis:${REDIS_VERSION:-latest}"
command: bash -c "echo yes | redis-cli --cluster create --cluster-replicas 1 ${HOST_IP}:8301 ${HOST_IP}:8302 ${HOST_IP}:8303 ${HOST_IP}:8304 ${HOST_IP}:8305 ${HOST_IP}:8306 --tls --cert /tls/redis.crt --key /tls/redis.key --cacert /tls/ca.crt "
depends_on: [redis-ssl-cluster-1, redis-ssl-cluster-2, redis-ssl-cluster-3, redis-ssl-cluster-4, redis-ssl-cluster-5, redis-ssl-cluster-6]
volumes:
- ./tests/tls:/tls
# primary only cluster
redis-cluster-noreplica-1:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8400 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8400:8400'
- '18400:18400'
redis-cluster-noreplica-2:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8401 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8401:8401'
- '18401:18401'
redis-cluster-noreplica-3:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8402 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8402:8402'
- '18402:18402'
redis-cluster-noreplica-init:
image: "redis:${REDIS_VERSION:-latest}"
command: bash -c "echo yes | redis-cli --cluster create --cluster-replicas 0 ${HOST_IP}:8400 ${HOST_IP}:8401 ${HOST_IP}:8402"
depends_on: [redis-cluster-noreplica-1, redis-cluster-noreplica-2, redis-cluster-noreplica-3]
# auth required cluster
redis-cluster-auth-1:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8500 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --requirepass sekret
ports:
- '8500:8500'
- '18500:18500'
redis-cluster-auth-2:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8501 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --requirepass sekret
ports:
- '8501:8501'
- '18501:18501'
redis-cluster-auth-3:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 8502 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP} --requirepass sekret
ports:
- '8502:8502'
- '18502:18502'
redis-cluster-auth-init:
image: "redis:${REDIS_VERSION:-latest}"
command: bash -c "echo yes | redis-cli --cluster create --cluster-replicas 0 ${HOST_IP}:8500 ${HOST_IP}:8501 ${HOST_IP}:8502 -a sekret"
depends_on: [redis-cluster-auth-1, redis-cluster-auth-2, redis-cluster-auth-3]
# stack cluster with replication
redis-stack-cluster-1:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9000 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
ports:
- '9000:9000'
- '19000:19000'
redis-stack-cluster-2:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9001 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
depends_on: [redis-stack-cluster-1]
ports:
- '9001:9001'
- '19001:19001'
redis-stack-cluster-3:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9002 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
ports:
- '9002:9002'
- '19002:19002'
redis-stack-cluster-4:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9003 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
depends_on: [redis-stack-cluster-3]
ports:
- '9003:9003'
- '19003:19003'
redis-stack-cluster-5:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9004 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
ports:
- '9004:9004'
- '19004:19004'
redis-stack-cluster-6:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
environment:
REDIS_ARGS: "--port 9005 --appendonly yes --protected-mode no --cluster-enabled yes --cluster-announce-ip ${HOST_IP}"
depends_on: [redis-stack-cluster-5]
ports:
- '9005:9005'
- '19005:19005'
redis-stack-cluster-init:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
command: bash -c "echo yes | redis-cli --cluster create --cluster-replicas 1 ${HOST_IP}:9000 ${HOST_IP}:9001 ${HOST_IP}:9002 ${HOST_IP}:9003 ${HOST_IP}:9004 ${HOST_IP}:9005"
depends_on: [redis-stack-cluster-1, redis-stack-cluster-2, redis-stack-cluster-3, redis-stack-cluster-4, redis-stack-cluster-5, redis-stack-cluster-6]
redis-basic:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 6379 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '6379:6379'
redis-auth:
image: "redis:${REDIS_VERSION:-latest}"
command: redis-server --port 6389 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --requirepass sekret
ports:
- '6389:6389'
redis-ssl:
image: "redis:${REDIS_SSL_VERSION:-latest}"
command: redis-server --port 0 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --tls-port 8379 --tls-cert-file /tls/redis.crt --tls-key-file /tls/redis.key --tls-ca-cert-file /tls/ca.crt
ports:
- '8379:8379'
volumes:
- ./tests/tls:/tls
redis-uds:
image: "redis:${REDIS_VERSION:-latest}"
command: sh -c "test ${HOST_OS} = \"Darwin\" && exit || redis-server --port 0 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes --unixsocket /sockets/coredis.redis.sock --unixsocketperm 777"
volumes:
- type: bind
source: /tmp/
target: /sockets/
redis-stack:
image: "redis/redis-stack:${REDIS_STACK_VERSION:-latest}"
ports:
- '9379:6379'
keydb:
image: "eqalpha/keydb"
ports:
- '10379:6379'
# keydb cluster
keydb-cluster-1:
image: "eqalpha/keydb"
command: keydb-server --port 8000 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8000:8000'
- '18000:18000'
keydb-cluster-2:
image: "eqalpha/keydb"
command: keydb-server --port 8001 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [keydb-cluster-1]
ports:
- '8001:8001'
- '18001:18001'
keydb-cluster-3:
image: "eqalpha/keydb"
command: keydb-server --port 8002 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8002:8002'
- '18002:18002'
keydb-cluster-4:
image: "eqalpha/keydb"
command: keydb-server --port 8003 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [keydb-cluster-3]
ports:
- '8003:8003'
- '18003:18003'
keydb-cluster-5:
image: "eqalpha/keydb"
command: keydb-server --port 8004 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
ports:
- '8004:8004'
- '18004:18004'
keydb-cluster-6:
image: "eqalpha/keydb"
command: keydb-server --port 8005 --protected-mode no --cluster-enabled yes --loglevel verbose --cluster-announce-ip ${HOST_IP}
depends_on: [keydb-cluster-5]
ports:
- '8005:8005'
- '18005:18005'
keydb-cluster-init:
image: "eqalpha/keydb"
command: bash -c "echo yes | keydb-cli --cluster create --cluster-replicas 1 ${HOST_IP}:8000 ${HOST_IP}:8001 ${HOST_IP}:8002 ${HOST_IP}:8003 ${HOST_IP}:8004 ${HOST_IP}:8005"
depends_on: [keydb-cluster-1, keydb-cluster-2, keydb-cluster-3, keydb-cluster-4, keydb-cluster-5, keydb-cluster-6]
dragonfly:
image: "docker.dragonflydb.io/dragonflydb/dragonfly:latest"
ports:
- '11379:6379'
ulimits:
memlock: -1
valkey:
image: "valkey/valkey:${VALKEY_VERSION:-unstable}"
command: redis-server --port 6379 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '12379:6379'
redict:
image: "registry.redict.io/redict:${REDICT_VERSION:-alpine}"
command: redict-server --port 6379 ${DEFAULT_ARGS---enable-debug-command yes} --appendonly yes
ports:
- '13379:6379'