-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (49 loc) · 1.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (49 loc) · 1.23 KB
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
services:
redis:
image: redis:alpine
ports:
- "16379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 15
redis-auth:
image: redis:alpine
command:
- sh
- -c
- |
printf 'requirepass secretpw\nuser worker on >workerpw ~* &* +@all\n' > /tmp/redis.conf
exec redis-server /tmp/redis.conf
ports:
- "16380:6379"
healthcheck:
test: ["CMD", "redis-cli", "-a", "secretpw", "--no-auth-warning", "ping"]
interval: 2s
timeout: 3s
retries: 15
nats:
image: nats:2.11-alpine
command: ["-js", "-m", "8222"]
ports:
- "14225:4222"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://127.0.0.1:8222/healthz"]
interval: 2s
timeout: 2s
retries: 30
redis-cluster:
image: grokzen/redis-cluster:7.0.10
environment:
IP: "0.0.0.0"
INITIAL_PORT: 17000
MASTERS: 3
SLAVES_PER_MASTER: 0
ports:
- "17000-17002:17000-17002"
healthcheck:
test: ["CMD-SHELL", "for p in 17000 17001 17002; do redis-cli -p $$p cluster info | grep -q cluster_state:ok || exit 1; done"]
interval: 2s
timeout: 5s
retries: 30