-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (57 loc) · 1.53 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
version: '3.8'
services:
rkvd-node1:
image: rkvd:v0.0.1
container_name: rkvd-node1
ports:
- "10001:10001" # Server address
- "10002:10002" # Raft address
command: ["--id", "1", "--raft-addr", "rkvd-node1:10001", "--server-addr", "rkvd-node1:10002"]
restart: on-failure
healthcheck:
test: [ "CMD", "curl", "-f", "http://rkvd-node1:10002/health" ]
interval: 6s
timeout: 5s
retries: 5
start_period: 3s
networks:
- rkv-network
rkvd-node2:
image: rkvd:v0.0.1
container_name: rkvd-node2
ports:
- "10003:10003"
- "10004:10004"
command: ["--id", "2", "--raft-addr", "rkvd-node2:10003", "--server-addr", "rkvd-node2:10004", "--join", "rkvd-node1:10002"]
restart: on-failure
healthcheck:
test: [ "CMD", "curl", "-f", "http://rkvd-node2:10004/health" ]
interval: 6s
timeout: 5s
retries: 5
start_period: 3s
depends_on:
- rkvd-node1
networks:
- rkv-network
rkvd-node3:
image: rkvd:v0.0.1
container_name: rkvd-node3
ports:
- "10005:10005"
- "10006:10006"
command: ["--id", "3", "--raft-addr", "rkvd-node3:10005", "--server-addr", "rkvd-node3:10006", "--join", "rkvd-node1:10002"]
restart: on-failure
healthcheck:
test: [ "CMD", "curl", "-f", "http://rkvd-node3:10006/health" ]
interval: 6s
timeout: 5s
retries: 5
start_period: 3s
depends_on:
- rkvd-node2
networks:
- rkv-network
networks:
rkv-network:
driver: bridge