-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
103 lines (98 loc) · 3.27 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
volumes:
prom:
services:
clickhouse:
image: "ghcr.io/go-faster/clickhouse-server:23.12"
ports:
- "9000:9000"
- "8123:8123"
volumes:
- ./_deploy/clickhouse.xml:/etc/clickhouse-server/config.d/monitoring.xml
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "127.0.0.1:8123/ping"]
interval: 1s
timeout: 1s
retries: 30
client:
image: ghcr.io/go-faster/simon
build:
context: .
dockerfile: build.Dockerfile
restart: always
command: ["client"]
environment:
- SERVER_ADDR=http://server:8080
- OTEL_ZAP_TEE=0
- OTEL_LOG_LEVEL=debug
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317
server:
image: ghcr.io/go-faster/simon
build:
context: .
dockerfile: build.Dockerfile
restart: always
command: ["server"]
environment:
- HTTP_ADDR=0.0.0.0:8080
- OTEL_ZAP_TEE=0
- OTEL_LOG_LEVEL=debug
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317
oteldb:
image: ghcr.io/go-faster/oteldb
environment:
- OTELDB_STORAGE=ch
- CH_DSN=clickhouse://clickhouse:9000
- OTEL_LOG_LEVEL=info
- OTEL_METRICS_EXPORTER=otlp
- OTEL_LOGS_EXPORTER=otlp
- OTEL_TRACES_EXPORTER=otlp
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_INSECURE=true
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317
- OTEL_RESOURCE_ATTRIBUTES=service.name=oteldb
ports:
- "9090:9090" # prometheus API
depends_on:
- clickhouse
# https://opentelemetry.io/docs/collector/installation/#docker-compose
otelcol:
image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:0.89.0
volumes:
- ./_deploy/otelcol.yml:/etc/otelcol-contrib/config.yaml
depends_on:
- oteldb
environment:
# probably excessive
- OTEL_EXPORTER_OTLP_TRACES_PROTOCOL=grpc
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otelcol:4317
command:
- "--config"
- "/etc/otelcol-contrib/config.yaml"
# https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/observability.md#how-we-expose-telemetry
- "--feature-gates=telemetry.useOtelForInternalMetrics"
- "--feature-gates=telemetry.useOtelWithSDKConfigurationForInternalTelemetry"
grafana:
image: "ghcr.io/go-faster/grafana:10.0.0"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor,traceToMetrics,publicDashboards,tempoApmTable
- GF_ALERTING_ENABLED=false
- GF_USERS_ALLOW_SIGN_UP=false
- GF_LOG_LEVEL=debug
- GF_INSTALL_PLUGINS=grafana-clickhouse-datasource
ports:
- "3000:3000"
volumes:
- ./_deploy/grafana/grafana.ini:/etc/grafana/grafana.ini
- ./_deploy/grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
- ./_deploy/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/default.yml
- ./_deploy/grafana/dashboards:/etc/grafana/dashboards:ro
depends_on:
- oteldb
- otelcol