-
Notifications
You must be signed in to change notification settings - Fork 40
/
docker-compose.yml
325 lines (306 loc) · 8.05 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
317
318
319
320
321
322
323
324
325
version: "3.8"
services:
################################################################################
# ROUTER SERVICES
router-publisher:
container_name: router-publisher
depends_on:
- rabbitmq
- signer
- redis
image: ghcr.io/connext/router-publisher:$ROUTER_VERSION
restart: always
environment:
GRAPH_API_KEY: $GRAPH_API_KEY
# ports:
# - "localhost:${ROUTER_EXTERNAL_PORT}:8091" #uncomment if you want to communicate with router API from localhost
logging:
driver: json-file
options:
max-size: 10m
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
volumes:
- ./config.json:/home/node/packages/agents/router/config.json
healthcheck:
test: netstat -ltn | grep -c 8091
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
router-subscriber:
container_name: router-subscriber
depends_on:
- rabbitmq
- signer
- redis
image: ghcr.io/connext/router-subscriber:$ROUTER_VERSION
restart: always
environment:
GRAPH_API_KEY: $GRAPH_API_KEY
logging:
driver: json-file
options:
max-size: 10m
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
volumes:
- ./config.json:/home/node/packages/agents/router/config.json
healthcheck:
test: netstat -ltn | grep -c 8090
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
################################################################################
# AUXILIARY SERVICES
signer:
container_name: signer
image: consensys/web3signer:$WEB3SIGNER_VERSION
command: "--config-file=/home/node/signer/config.yaml eth1"
restart: always
volumes:
- ./data/signerConfig/config.yaml:/home/node/signer/config.yaml
- ./key.yaml:/home/node/signer/keyFiles/key.yaml
logging:
driver: json-file
options:
max-size: 10m
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
healthcheck:
test: netstat -ltn | grep -c 9000
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
rabbitmq:
container_name: rabbitmq
image: rabbitmq:$RABBITMQ_VERSION
healthcheck:
test: ps aux| grep rabbitmq-server
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
redis:
container_name: redis
image: redis:$REDIS_VERSION
restart: always
volumes:
- redis_data:/data
logging:
driver: json-file
options:
max-size: 10m
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
healthcheck:
test: redis-cli --raw incr ping
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
logdna:
container_name: logdna
image: logdna/logspout:$LOGDNA_VERSION
restart: always
environment:
LOGDNA_KEY: $LOGDNA_KEY
TAGS: $LOGDNA_TAG
volumes:
- /var/run/docker.sock:/var/run/docker.sock
logging:
driver: json-file
options:
max-size: 10m
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}"
healthcheck:
test: netstat -ltn | grep -c 80
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
################################################################################
# MONITORING SERVICES
prometheus:
container_name: prometheus
image: prom/prometheus:$PROMETHEUS_VERSION
restart: always
#ports:
# - $PROMETHEUS_EXTERNAL_PORT:9090 #uncomment this if you want/need direct Prometheus access
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=45d
volumes:
- ./data/prometheusConfig/prometheus.yml:/etc/prometheus/prometheus.yml
- ./data/prometheusConfig/alert.rules.host:/etc/prometheus/alert.rules.host
- ./data/prometheusConfig/alert.rules.prod:/etc/prometheus/alert.rules.prod
- prometheus:/prometheus
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 9090
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
alertmanager:
container_name: alertmanager
image: prom/alertmanager:$ALERTAMANGER_VERSION
restart: always
# ports:
# - $ALERTMANAGER_EXTERNAL_PORT:9093 #uncomment this if you want/need direct Prometheus access
command: --config.file=/config/alertmanager.yml --log.level=debug
volumes:
- ./data/alertmanagerConfig/alertmanager.yml:/config/alertmanager.yml
- alertmanager:/data
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 9093
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
grafana:
container_name: grafana
image: grafana/grafana:$GRAFANA_VERSION
restart: always
ports:
- $GRAFANA_EXTERNAL_PORT:3000
environment:
- GRAFANA_PASSWORD=$GRAFANA_PASSWORD
volumes:
- ./data/grafanaConfig/grafana:/etc/grafana
- ./data/grafanaConfig/dashboards:/etc/dashboards
- grafana:/var/lib/grafana
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 3000
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
loki:
container_name: loki
image: grafana/loki:$LOKI_VERSION
command: -config.file=/etc/loki/config.yml
volumes:
- ./data/lokiConfig:/etc/loki
- loki:/loki
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 3100
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
promtail:
container_name: promtail
image: grafana/promtail:$PROMTAIL_VERSION
volumes:
- /var/lib/docker/containers:/var/lib/docker/containers
- ./data/promtailConfig/config.yml:/etc/promtail/promtail.yml
command: -config.file=/etc/promtail/promtail.yml
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: exit 0
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
################################################################################
# EXPORTER SERVICES
node-exporter:
container_name: node-exporter
image: prom/node-exporter:$NODE_EXPORTER_VERSION
restart: always
command:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/rootfs
- --collector.filesystem.ignored-mount-points
- ^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns)(/)
cap_add:
- SYS_TIME
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 9100
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
cadvisor:
container_name: cadvisor
image: gcr.io/cadvisor/cadvisor:$CADVISOR_VERSION
restart: always
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
devices:
- /dev/kmsg:/dev/kmsg
logging:
driver: json-file
options:
max-size: 10m
healthcheck:
test: netstat -ltn | grep -c 8080
interval: 5s
timeout: 5s
retries: 5
start_period: 5s
networks:
- connext
################################################################################
networks:
connext:
volumes:
prometheus:
grafana:
loki:
redis_data:
alertmanager: