-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
84 lines (80 loc) · 1.84 KB
/
docker-compose.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
version: '3'
networks:
kv_net:
driver: bridge
ipam:
driver: default
config:
- subnet: "172.24.2.0/16"
gateway: "172.24.0.1"
services:
replica1:
image: maxpoletaev/kivi
container_name: kivi-1
stop_grace_period: 30s
environment:
- NODE_ID=1
- NODE_NAME=replica1
- GRPC_PUBLIC_ADDR=172.24.2.1:3000
- STORAGE_DATA_ROOT=/data
- CLUSTER_JOIN_ADDRS=replica2:3000
- CLUSTER_PROBE_INDIRECT_NODES=2
- CLUSTER_PROBE_INTERVAL=1000
- RESTAPI_ENABLED=true
- VERBOSE=true
ports:
- 3001:3000
- 8001:8000
networks:
kv_net:
ipv4_address: 172.24.2.1
volumes:
- ./data/replica1:/data
replica2:
depends_on:
- replica1
image: maxpoletaev/kivi
container_name: kivi-2
stop_grace_period: 30s
environment:
- NODE_ID=2
- NODE_NAME=replica2
- GRPC_PUBLIC_ADDR=172.24.2.2:3000
- STORAGE_DATA_ROOT=/data
- CLUSTER_JOIN_ADDRS=replica1:3000
- CLUSTER_PROBE_INDIRECT_NODES=2
- CLUSTER_PROBE_INTERVAL=1000
- RESTAPI_ENABLED=true
- VERBOSE=true
ports:
- 3002:3000
- 8002:8000
networks:
kv_net:
ipv4_address: 172.24.2.2
volumes:
- ./data/replica2:/data
replica3:
depends_on:
- replica2
image: maxpoletaev/kivi
container_name: kivi-3
stop_grace_period: 30s
environment:
- NODE_ID=3
- NODE_NAME=replica3
- GRPC_PUBLIC_ADDR=172.24.2.3:3000
- STORAGE_DATA_ROOT=/data
- CLUSTER_JOIN_ADDRS=replica2:3000
- CLUSTER_PROBE_INDIRECT_NODES=2
- CLUSTER_PROBE_INTERVAL=1000
- RESTAPI_ENABLED=true
- VERBOSE=true
ports:
- 3003:3000
- 8003:8000
networks:
kv_net:
ipv4_address: 172.24.2.3
volumes:
- ./data/replica3:/data