-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
316 lines (293 loc) · 7.92 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
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
---
version: '3.7'
services:
blockexplorerd:
image: cachecash/go-cachecash
build: .
command: blockexplorerd -logLevel debug -trace http://jaeger:14268
ports:
# www
- 8080:8080
# status
- 8103:8100
environment:
- CACHECASH_INSECURE=true
- BLOCKEXPLORER_LEDGER_ADDR=ledger:7778
- BLOCKEXPLORER_ROOT=http://localhost:8080/
logpiped:
image: cachecash/go-cachecash
build: .
command: /setup/logpiped.sh
environment:
- CACHECASH_INSECURE=true
ports:
- 9005:9005
volumes:
- ./data/logpiped:/var/spool/logpiped
- ./testdata/config:/config
- ./deploy/:/setup/
env_file:
- ./deploy/secrets/logpiped.secret
kvstore-db:
image: postgres:11
env_file:
- ./deploy/secrets/logpiped.secret
ledger:
image: cachecash/go-cachecash
build: .
command: ledgerd -logLevel debug -mine-blocks -mine-interval 15
ports:
- 7778:7778 # Ledger service
- 9091:8100 # Status
environment:
- CACHECASH_INSECURE=true
volumes:
- ./data/ledger:/data
env_file:
- ./deploy/secrets/ledger.secret
ledger-db:
image: postgres:11
ports:
- 5433:5432
env_file:
- ./deploy/secrets/ledger.secret
upstream:
image: nginx
ports:
- 8081:80
volumes:
- ./testdata/content:/usr/share/nginx/html
upstream-apache:
image: httpd
ports:
- 8091:80
volumes:
- ./testdata/content:/usr/local/apache2/htdocs
upstream-lighttpd:
build: deploy/httpds/lighttpd
ports:
- 8092:80
volumes:
- ./testdata/content:/var/www/localhost/htdocs
upstream-caddy:
build: deploy/httpds/caddy
ports:
- 8093:80
volumes:
- ./testdata/content:/var/www
upstream-python:
image: python:3-alpine
command: python -m http.server -d /var/www 80
init: true
ports:
- 8094:80
volumes:
- ./testdata/content:/var/www
publisher:
image: cachecash/go-cachecash
build: .
command: publisherd -logLevel debug -trace http://jaeger:14268
ports:
- 7070:7070
- 8043:8043
# status
- 8100:8100
environment:
- CACHECASH_INSECURE=true
# Configure the publisher origin to avoid CORS errors.
- PUBLISHER_ORIGIN=http://localhost:1234
# If there is any cache running outside of a local network shared by the daemons,
# update the publisher address to include the IP address or domain name of
# the machine where the publisher is running to make the publisher reachable.
- PUBLISHER_PUBLISHER_ADDR=publisher:7070
- PUBLISHER_UPSTREAM=${PUBLISHER_UPSTREAM:-http://upstream:80}
- PUBLISHER_BOOTSTRAP_ADDR=bootstrapd:7777
volumes:
- ./data/publisher:/data
env_file:
- ./deploy/secrets/publisher.secret
publisher-db:
image: postgres:11
ports:
- 5434:5432
env_file:
- ./deploy/secrets/publisher.secret
bootstrapd:
image: cachecash/go-cachecash
build: .
command: bootstrapd -logLevel debug -trace http://jaeger:14268
environment:
- CACHECASH_INSECURE=true
- BOOTSTRAP_PROXY_PROTOCOL=false
ports:
- 7777:7777
# status
- 8101:8100
volumes:
- ./data/bootstrapd:/data
faucetd:
image: cachecash/go-cachecash
build: .
# command: faucetd -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
command: faucetd -logLevel debug -keypair /ledger/ledger.keypair.json
environment:
- CACHECASH_INSECURE=true
- FAUCET_LEDGER_ADDR=ledger:7778
ports:
- 7781:7781
volumes:
- ./data/faucetd:/data
# mount ledger keypair
- ./data/ledger:/ledger
cache-0:
image: cachecash/go-cachecash
build: .
# If the cache runs outside of a local network shared by the jaeger and logpipe,
# replace jaeger:14268, and logpiped:9005 accordingly to reach them.
command: cached -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
ports:
- 9000:9000
- 9443:9443
# status
- 7100:7100
environment:
- CACHECASH_INSECURE=true
- CACHE_GRPC_ADDR=cache-0:9000
- CACHE_HTTP_ADDR=cache-0:9443
- CACHE_STATUS_ADDR=cache-0:7100
# If the cache does not run as part of a local network shared by the daemons,
# replace cache-0 with the IP address or domain name of the machine
# where the cache is running to make the cache reachable.
# - CACHE_CONTACT_URL=http://cache-0
# If the same situation above applies, change bootstrap, ledger, and metrics
# to include the IP address or domain name of the machine(s) where they are
# running to reach them.
- CACHE_BOOTSTRAP_ADDR=bootstrapd:7777
- CACHE_LEDGER_ADDR=ledger:7778
- CACHE_METRICS_ENDPOINT=metrics:8000
volumes:
- ./data/cache-0:/data
cache-1:
image: cachecash/go-cachecash
build: .
command: cached -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
ports:
- 9001:9001
- 9444:9444
# status
- 7101:7101
environment:
- CACHECASH_INSECURE=true
- CACHE_GRPC_ADDR=cache-1:9001
- CACHE_HTTP_ADDR=cache-1:9444
- CACHE_STATUS_ADDR=cache-1:7101
# - CACHE_CONTACT_URL=http://cache-1
- CACHE_BOOTSTRAP_ADDR=bootstrapd:7777
- CACHE_LEDGER_ADDR=ledger:7778
- CACHE_METRICS_ENDPOINT=metrics:8000
volumes:
- ./data/cache-1:/data
cache-2:
image: cachecash/go-cachecash
build: .
command: cached -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
ports:
- 9002:9002
- 9445:9445
# status
- 7102:7102
environment:
- CACHECASH_INSECURE=true
- CACHE_GRPC_ADDR=cache-2:9002
- CACHE_HTTP_ADDR=cache-2:9445
- CACHE_STATUS_ADDR=cache-2:7102
# - CACHE_CONTACT_URL=http://cache-2
- CACHE_BOOTSTRAP_ADDR=bootstrapd:7777
- CACHE_LEDGER_ADDR=ledger:7778
- CACHE_METRICS_ENDPOINT=metrics:8000
volumes:
- ./data/cache-2:/data
cache-3:
image: cachecash/go-cachecash
build: .
command: cached -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
ports:
- 9003:9003
- 9446:9446
- 7103:7103
environment:
- CACHECASH_INSECURE=true
- CACHE_GRPC_ADDR=cache-3:9003
- CACHE_HTTP_ADDR=cache-3:9446
- CACHE_STATUS_ADDR=cache-3:7103
# - CACHE_CONTACT_URL=http://cache-3
- CACHE_BOOTSTRAP_ADDR=bootstrapd:7777
- CACHE_LEDGER_ADDR=ledger:7778
- CACHE_METRICS_ENDPOINT=metrics:8000
volumes:
- ./data/cache-3:/data
cache-4:
image: cachecash/go-cachecash
build: .
command: cached -logLevel debug -trace http://jaeger:14268 -logAddress logpiped:9005
ports:
- 9004:9004
- 9447:9447
# status
- 7104:7104
environment:
- CACHECASH_INSECURE=true
- CACHE_GRPC_ADDR=cache-4:9004
- CACHE_HTTP_ADDR=cache-4:9447
- CACHE_STATUS_ADDR=cache-4:7104
# - CACHE_CONTACT_URL=http://cache-4
- CACHE_BOOTSTRAP_ADDR=bootstrapd:7777
- CACHE_LEDGER_ADDR=ledger:7778
- CACHE_METRICS_ENDPOINT=metrics:8000
volumes:
- ./data/cache-4:/data
jaeger:
image: jaegertracing/all-in-one:1.8
ports:
- 5775:5775/udp
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
# UI
- 16686:16686
- 14268:14268
- 9411:9411
elasticsearch:
image: elasticsearch:7.3.0
volumes:
- ./deploy/:/setup/
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
- xpack.security.enabled=true
env_file:
- ./deploy/secrets/elasticsearch.secret
kibana:
image: kibana:7.3.0
command: /bin/sh -c /setup/elasticsearch-kibana/kibana.sh
volumes:
- ./deploy/:/setup/
ports:
- 5601:5601
environment:
- xpack.security.enabled=true
env_file:
- ./deploy/secrets/kibana.secret
- ./deploy/secrets/elasticsearch.secret
metrics:
image: cachecash/go-cachecash
build: .
command: metrics-proxy -logLevel debug -trace http://jaeger:14268
environment:
- CACHECASH_INSECURE=true
ports:
- 8000:8000
- 8102:8100
...