-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
180 lines (172 loc) · 5.49 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
networks:
hostnetwork:
# If an error occurs "network hostnetwork declared as external, but could not be found", run:
# $ docker network create hostnetwork
driver: bridge
external: true
services:
otelcol:
# ref: https://hub.docker.com/r/otel/opentelemetry-collector-contrib/tags
image: otel/opentelemetry-collector-contrib:0.116.1
restart: always
networks:
hostnetwork:
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the Collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "55679:55679" # zpages extension
volumes:
#- type: bind
# source: /var/lib/docker/containers
# target: /var/lib/docker/containers:ro
- type: bind
source: ./docker-compose/volume/otelcol/file_storage
target: /var/lib/otelcol/file_storage
- type: bind
source: ./docker-compose/config/otelcol/otelcol.yaml
target: /etc/otelcol-contrib/config.yaml
depends_on:
- loki
loki:
image: grafana/loki:latest
networks:
hostnetwork:
ports:
- "33100:3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- type: bind
source: ./docker-compose/volume/loki
target: /loki
cadvisor:
# ref: https://gcr.io/cadvisor/cadvisor
image: gcr.io/cadvisor/cadvisor:v0.51.0
#platform: linux/amd64
platform: linux/aarch64
# container_name: cadvisor
privileged: true
restart: always
networks:
hostnetwork:
ports:
- "38080:8080"
volumes:
- "/:/rootfs:ro"
- "/var/run:/var/run:ro"
- "/sys:/sys:ro"
- "/var/lib/docker/:/var/lib/docker:ro"
- "/dev/disk/:/dev/disk:ro"
#- ${HOME}/.docker/run/docker.sock:/var/run/docker.sock:ro"
#jaeger-all-in-one:
# image: jaegertracing/all-in-one:1.60
# restart: always
# networks:
# - hostnetwork
# ports:
# - "16686:16686" # Jaeger UI http://localhost:16686/
# environment:
# - COLLECTOR_OTLP_ENABLED=true
prometheus:
# ref: https://hub.docker.com/r/prom/prometheus/tags
image: prom/prometheus:v3.1.0
restart: always
networks:
hostnetwork:
ports:
- "39090:9090" # Prometheus UI http://localhost:39090/
volumes:
- type: bind
source: ./docker-compose/config/prometheus/prometheus.yaml
target: /etc/prometheus/prometheus.yml
- type: bind
source: ./docker-compose/volume/prometheus/tsdb
target: /data/prometheus/tsdb
entrypoint:
- "/bin/prometheus"
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/data/prometheus/tsdb"
- "--enable-feature=expand-external-labels"
- "--web.enable-remote-write-receiver"
depends_on:
- otelcol
- cadvisor
minio:
# ref: https://hub.docker.com/r/minio/minio/tags
image: minio/minio:RELEASE.2024-12-18T13-15-44Z-cpuv1
restart: always
networks:
hostnetwork:
ports:
- 39001:9001 # Minio UI http://localhost:39001/
entrypoint: /bin/sh -c "mc mb --ignore-existing /data/minio/tempo ; minio server /data/minio --console-address ':9001'"
volumes:
- type: bind
source: ./docker-compose/volume/minio
target: /data/minio
environment:
- MINIO_ROOT_USER=root
- MINIO_ROOT_PASSWORD=password
tempo:
# ref: https://hub.docker.com/r/grafana/tempo/tags
image: &tempoImage grafana/tempo:2.6.1
restart: always
networks:
hostnetwork:
#ports:
# - 33200:3200
#command: "-target=scalable-single-binary -config.expand-env=true -config.file=/etc/tempo.yaml"
command: "-config.expand-env=true -config.file=/etc/tempo.yaml"
environment:
- PROMETHEUS_REMOTE_WRITE_ENDPOINT=http://prometheus:9090
- S3_BUCKET=tempo
- S3_ENDPOINT=minio:9000
- S3_ACCESS_KEY=root
- S3_SECRET_KEY=password
volumes:
- type: bind
source: ./docker-compose/config/tempo/tempo.yaml
target: /etc/tempo.yaml
- type: bind
source: ./docker-compose/volume/tempo
target: /var/tempo
depends_on:
- minio
- tempo-init
tempo-init:
image: *tempoImage
user: root
# Tempo runs as user 10001, and docker compose creates the volume as root.
# As such, we need to chown the volume in order for Tempo to start correctly.
entrypoint: sh -c "chown 10001:10001 /var/tempo && tail -f /dev/null"
volumes:
- type: bind
source: ./docker-compose/volume/tempo
target: /var/tempo
stop_grace_period: 1s
grafana:
# ref: https://hub.docker.com/r/grafana/grafana/tags
image: grafana/grafana:11.4.0
restart: always
networks:
hostnetwork:
ports:
- 33000:3000 # Grafana UI http://localhost:33000/
volumes:
- type: bind
source: ./docker-compose/config/grafana/datasources.yaml
target: /etc/grafana/provisioning/datasources/datasources.yaml
- type: bind
source: ./docker-compose/config/grafana/dashboards.yaml
target: /etc/grafana/provisioning/dashboards/main.yaml
- type: bind
source: ./docker-compose/config/grafana/dashboards
target: /var/lib/grafana/dashboards
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor