-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
172 lines (165 loc) · 3.72 KB
/
docker-compose.yml
File metadata and controls
172 lines (165 loc) · 3.72 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
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
x-nokv-image: &nokv-image
build: .
image: nokv:latest
services:
bootstrap:
<<: *nokv-image
container_name: nokv-bootstrap
entrypoint: ["/usr/local/bin/bootstrap_from_config.sh"]
command:
[
"--config",
"/etc/nokv/raft_config.json",
"--path-template",
"/volumes/store-{id}"
]
volumes:
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
- node1-data:/volumes/store-1
- node2-data:/volumes/store-2
- node3-data:/volumes/store-3
restart: "no"
pd:
image: nokv:latest
container_name: nokv-pd
entrypoint: ["/usr/local/bin/nokv"]
command:
[
"pd",
"--addr",
"0.0.0.0:2379",
"--id-start",
"1",
"--ts-start",
"100",
"--workdir",
"/var/lib/nokv-pd"
]
expose:
- "2379"
ports:
- "2379:2379"
volumes:
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
- pd-data:/var/lib/nokv-pd
restart: "no"
stop_signal: SIGINT
stop_grace_period: 30s
node1:
image: nokv:latest
container_name: nokv-node1
entrypoint: ["/usr/local/bin/serve_from_config.sh"]
command:
[
"--config",
"/etc/nokv/raft_config.json",
"--store-id",
"1",
"--workdir",
"/var/lib/nokv",
"--scope",
"docker"
]
volumes:
- node1-data:/var/lib/nokv
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
ports:
- "20160:20160"
depends_on:
bootstrap:
condition: service_completed_successfully
pd:
condition: service_started
restart: "no"
stop_signal: SIGINT
stop_grace_period: 30s
node2:
image: nokv:latest
container_name: nokv-node2
entrypoint: ["/usr/local/bin/serve_from_config.sh"]
command:
[
"--config",
"/etc/nokv/raft_config.json",
"--store-id",
"2",
"--workdir",
"/var/lib/nokv",
"--scope",
"docker"
]
volumes:
- node2-data:/var/lib/nokv
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
ports:
- "20161:20160"
depends_on:
bootstrap:
condition: service_completed_successfully
pd:
condition: service_started
restart: "no"
stop_signal: SIGINT
stop_grace_period: 30s
node3:
image: nokv:latest
container_name: nokv-node3
entrypoint: ["/usr/local/bin/serve_from_config.sh"]
command:
[
"--config",
"/etc/nokv/raft_config.json",
"--store-id",
"3",
"--workdir",
"/var/lib/nokv",
"--scope",
"docker"
]
volumes:
- node3-data:/var/lib/nokv
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
ports:
- "20162:20160"
depends_on:
bootstrap:
condition: service_completed_successfully
pd:
condition: service_started
restart: "no"
stop_signal: SIGINT
stop_grace_period: 30s
redis:
image: nokv:latest
container_name: nokv-redis
entrypoint: ["/usr/local/bin/nokv-redis"]
command:
[
"--addr",
"0.0.0.0:6380",
"--raft-config",
"/etc/nokv/raft_config.json",
"--addr-scope",
"docker"
]
ports:
- "6380:6380"
volumes:
- ./raft_config.example.json:/etc/nokv/raft_config.json:ro
depends_on:
node1:
condition: service_started
node2:
condition: service_started
node3:
condition: service_started
pd:
condition: service_started
restart: "no"
stop_signal: SIGINT
stop_grace_period: 30s
volumes:
node1-data:
node2-data:
node3-data:
pd-data: