-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcompose-services.yml
446 lines (445 loc) · 13.3 KB
/
compose-services.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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
version: "3.5"
x-logging: &logging
logging:
driver: loki
options:
loki-url: "http://host.docker.internal:3100/loki/api/v1/push"
mode: non-blocking
max-buffer-size: 4m
loki-retries: "3"
services:
temporal-history:
<<: *logging
container_name: temporal-history
# depends_on:
# - temporal-admin-tools
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=history
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
# - BIND_ON_IP=0.0.0.0
- PROMETHEUS_ENDPOINT=0.0.0.0:8000
# - TEMPORAL_BROADCAST_ADDRESS=temporal-history
- NUM_HISTORY_SHARDS=2048
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7234
target: 7234
- published: 8000
target: 8000
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-history2:
<<: *logging
container_name: temporal-history2
# depends_on:
# - temporal-admin-tools
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=history
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
# - BIND_ON_IP=0.0.0.0
- PROMETHEUS_ENDPOINT=0.0.0.0:8005
# - TEMPORAL_BROADCAST_ADDRESS=temporal-history
- HISTORY_MEMBERSHIP_PORT=6934
- HISTORY_GRPC_PORT=7238
- LOG_LEVEL=warn
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7238
target: 7238
- published: 8005
target: 8005
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-matching:
<<: *logging
container_name: temporal-matching
depends_on:
- temporal-history
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=matching
- PROMETHEUS_ENDPOINT=0.0.0.0:8001
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7235
target: 7235
- published: 8001
target: 8001
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-matching2:
<<: *logging
container_name: temporal-matching2
depends_on:
- temporal-history
- temporal-history2
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=matching
- PROMETHEUS_ENDPOINT=0.0.0.0:8006
- MATCHING_GRPC_PORT=7249
- MATCHING_MEMBERSHIP_PORT=6939
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7249
target: 7249
- published: 8006
target: 8006
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-frontend:
<<: *logging
container_name: temporal-frontend
depends_on:
- temporal-matching
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=frontend
- FRONTEND_GRPC_PORT=7237
- PROMETHEUS_ENDPOINT=0.0.0.0:8002
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
- FRONTEND_HTTP_PORT=7244
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7237
target: 7237
- published: 7244
target: 7244
- published: 8002
target: 8002
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-frontend2:
<<: *logging
container_name: temporal-frontend2
depends_on:
- temporal-matching
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=frontend
# set different frontend grpc port
- FRONTEND_GRPC_PORT=7236
# set different membership port than temporal-frontend
- FRONTEND_MEMBERSHIP_PORT=6936
- PROMETHEUS_ENDPOINT=0.0.0.0:8004
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
- FRONTEND_HTTP_PORT=7245
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7236
target: 7236
- published: 7245
target: 7245
- published: 8004
target: 8004
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-internal-frontend:
<<: *logging
container_name: temporal-internal-frontend
depends_on:
- temporal-matching
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=internal-frontend
- PROMETHEUS_ENDPOINT=0.0.0.0:8007
- NUM_HISTORY_SHARDS=2048
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7231
target: 7231
- published: 8007
target: 8007
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-worker:
<<: *logging
container_name: temporal-worker
depends_on:
- temporal-frontend
- temporal-frontend2
environment:
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
- SERVICES=worker
- PROMETHEUS_ENDPOINT=0.0.0.0:8003
# set to loadbalancing
- USE_INTERNAL_FRONTEND=true
- LOG_LEVEL=warn
image: temporalio/server:${TEMPORAL_SERVER_IMG}
ports:
- published: 7232
target: 7232
- published: 8003
target: 8003
restart: on-failure
volumes:
- ./dynamicconfig:/etc/temporal/config/dynamicconfig
- ./template/my_config_template.yaml:/etc/temporal/config/config_template.yaml
temporal-admin-tools:
<<: *logging
container_name: temporal-admin-tools
depends_on:
- temporal-frontend
- temporal-frontend2
environment:
- TEMPORAL_CLI_ADDRESS=temporal-loadbalancing:7233
- TEMPORAL_ADDRESS=temporal-loadbalancing:7233
- DB=postgres12
- DB_PORT=${POSTGRES_DEFAULT_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PWD=${POSTGRES_PWD}
- POSTGRES_SEEDS=postgresql
- TEMPORAL_HOME=/etc/temporal
# set to loadbalancing
- PUBLIC_FRONTEND_ADDRESS=temporal-loadbalancing:7233
image: temporalio/admin-tools:${TEMPORAL_ADMINTOOLS_IMG}
volumes:
- "./script/setup.sh:/etc/temporal/setup.sh"
entrypoint:
- /etc/temporal/setup.sh
restart: always
stdin_open: true
tty: true
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal-admin-tools
environment:
- TEMPORAL_ADDRESS=temporal-loadbalancing:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
- TEMPORAL_UI_PORT=8081
- TEMPORAL_SHOW_TEMPORAL_SYSTEM_NAMESPACE=true
image: temporalio/ui:${TEMPORAL_UI_IMG}
ports:
- published: 8081
target: 8081
prometheus:
<<: *logging
container_name: prometheus
image: prom/prometheus:${PROMETHEUS_IMG}
command: --config.file=/etc/prometheus/prometheus.yml --log.level=error
ports:
- published: 9090
target: 9090
volumes:
- type: bind
source: ./deployment/prometheus/config.yml
target: /etc/prometheus/prometheus.yml
depends_on:
- temporal-worker
grafana:
container_name: grafana
image: grafana/grafana:${GRAFANA_IMG}
environment:
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
ports:
- published: 8085
target: 3000
volumes:
- type: bind
source: ./deployment/grafana/dashboards
target: /var/lib/grafana/dashboards
- type: bind
source: ./deployment/grafana/provisioning/dashboards
target: /etc/grafana/provisioning/dashboards
- type: bind
source: ./deployment/grafana/provisioning/datasources
target: /etc/grafana/provisioning/datasources
- type: bind
source: ./deployment/grafana/provisioning/alerting
target: /etc/grafana/provisioning/alerting
- type: bind
source: ./deployment/grafana/provisioning/notifiers
target: /etc/grafana/provisioning/notifiers
- type: bind
source: ./deployment/grafana/grafana.ini
target: /etc/grafana/grafana.ini
depends_on:
- prometheus
portainer:
container_name: portainer
image: portainer/portainer-ce:${PORTAINER_IMG}
security_opt:
- no-new-privileges:true
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./portainer-data:/data
ports:
- published: 9000
target: 9000
jaeger-all-in-one:
image: jaegertracing/all-in-one:${JAEGER_IMG}
ports:
- published: 16686
target: 16686
- published: 14268
target: 14268
- published: 14250
target: 14250
otel-collector:
image: otel/opentelemetry-collector:${OTEL_IMG}
command: [ "--config=/etc/otel-collector-config.yaml" ]
volumes:
- type: bind
source: ./deployment/otel/otel-config.yaml
target: /etc/otel-collector-config.yaml
ports:
- published: 1888
target: 1888
- published: 13133
target: 13133
- published: 4317
target: 4317
- published: 55670
target: 55670
depends_on:
- jaeger-all-in-one
loki:
container_name: loki
image: grafana/loki:${LOKI_IMG}
ports:
- published: 3100
target: 3100
command: -config.file=/etc/loki/local-config.yaml
volumes:
- type: bind
source: ./deployment/loki/local-config.yaml
target: /etc/loki/local-config.yaml
depends_on:
- grafana
cadvisor:
image: gcr.io/cadvisor/cadvisor-arm64:${CADVISOR_IMG}
container_name: cadvisor
ports:
- 9092:9092
command:
- '-port=9092'
volumes:
- /:/rootfs:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
#envoy
temporal-loadbalancing:
<<: *logging
container_name: temporal-envoy
image: envoyproxy/envoy:${ENVOY_IMG}
ports:
- published: 7233
target: 7233
- published: 7243
target: 7243
- published: 9901
target: 9901
volumes:
- type: bind
source: ./deployment/envoy/envoy.yaml
target: /etc/envoy/envoy.yaml
restart: on-failure
depends_on:
- temporal-admin-tools
- temporal-frontend
- temporal-frontend2
# nginx
# temporal-loadbalancing:
# <<: *logging
# image: nginx:${NGINX_IMG}
# container_name: temporal-nginx
# restart: unless-stopped
# depends_on:
# - temporal-frontend
# - temporal-frontend2
# ports:
# - 7233:7233
# volumes:
# - ./deployment/nginx/nginx.conf:/etc/nginx/nginx.conf
# haproxy
# temporal-loadbalancing:
# <<: *logging
# image: haproxy:${HAPROXY_IMG}
# container_name: temporal-haproxy
# restart: unless-stopped
# depends_on:
# - temporal-admin-tools
# ports:
# - 7233:7233
# - 8404:8404
# volumes:
# - ./deployment/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
default:
external: true
name: temporal-network