-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (33 loc) · 847 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (33 loc) · 847 Bytes
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
services:
master:
build: .
ports:
- "6380:6380"
healthcheck:
test:
[
"CMD",
"sh",
"-c",
"printf 'PING\\r\n' | nc -w 1 localhost 6380",
]
interval: 2s
timeout: 3s
retries: 5
start_period: 10s
replica1:
build: .
ports:
- "6381:6380"
command: ["--port", "6380", "--replicaof", "master 6380"]
depends_on:
master:
condition: service_healthy
replica2:
build: .
ports:
- "6382:6380"
command: ["--port", "6380", "--replicaof", "master 6380"]
depends_on:
master:
condition: service_healthy