-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
236 lines (223 loc) · 5.79 KB
/
Copy pathdocker-compose.yml
File metadata and controls
236 lines (223 loc) · 5.79 KB
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
name: monitoring-stack
services:
node-exporter:
image: prom/node-exporter:v1.8.0
container_name: node-exporter
restart: always
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
deploy:
resources:
limits:
memory: 512M
env_file: .env
command:
- "--path.procfs=/host/proc"
- "--path.rootfs=/rootfs"
- "--path.sysfs=/host/sys"
- "--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)"
networks:
- monitoring
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: cadvisor
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
networks:
- monitoring
# Automated Bucket Creation for MinIO
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
container_name: minio
hostname: minio
domainname: minio
env_file: .env
command: server /data --console-address ":9001"
restart: always
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
volumes:
- minio-data:/data
deploy:
resources:
limits:
memory: 512M
networks:
- monitoring
minio-setup:
image: minio/mc:RELEASE.2025-08-13T08-35-41Z
container_name: minio-setup
restart: on-failure
network_mode: "service:minio"
depends_on:
minio:
condition: service_healthy
env_file: .env
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set local http://127.0.0.1:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD) do echo '...waiting for minio' && sleep 1; done;
for bucket in $$(echo $$MINIO_BUCKETS | tr ',' ' '); do
/usr/bin/mc mb --ignore-existing local/$$bucket;
done;
exit 0;
"
loki:
image: grafana/loki:3.0.0
container_name: loki
hostname: loki
domainname: loki
restart: always
command:
- "-config.file=/etc/loki/config.yaml"
- "-config.expand-env=true"
env_file: .env
volumes:
- ./configs/loki-config.yaml:/etc/loki/config.yaml
- loki-data:/loki
depends_on:
minio-setup:
condition: service_completed_successfully
deploy:
resources:
limits:
memory: 1G
networks:
- monitoring
mimir:
image: grafana/mimir:2.12.0
container_name: mimir
hostname: prometheus
domainname: mimir
restart: always
command:
- "-config.file=/etc/mimir/mimir.yaml"
- "-config.expand-env=true"
# Enable the alertmanager and ruler
- "-target=all,alertmanager,ruler"
env_file: .env
volumes:
- ./configs/mimir-config.yaml:/etc/mimir/mimir.yaml
- ./configs/alertmanager.yaml:/etc/mimir/alertmanager.yaml
- ./configs/mimir-rules.yaml:/etc/mimir/rules/anonymous/rules.yaml
- mimir-data:/data
depends_on:
minio-setup:
condition: service_completed_successfully
deploy:
resources:
limits:
memory: 1.5G
cpus: "1.0"
networks:
- monitoring
tempo:
image: grafana/tempo:2.4.1
container_name: tempo
hostname: tempo
domainname: tempo
restart: always
env_file: .env
command:
- "-config.file=/etc/tempo/tempo.yaml"
- "-config.expand-env=true"
volumes:
- ./configs/tempo-config.yaml:/etc/tempo/tempo.yaml
- tempo-data:/var/tempo
depends_on:
minio-setup:
condition: service_completed_successfully
deploy:
resources:
limits:
memory: 1G
networks:
- monitoring
alloy:
image: grafana/alloy:v1.1.0
container_name: alloy
hostname: alloy
domainname: alloy
restart: always
volumes:
- ./configs/alloy-config.alloy:/etc/alloy/config.alloy
- /var/run/docker.sock:/var/run/docker.sock
command: run --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
deploy:
resources:
limits:
memory: 512M
networks:
- monitoring
otel-collector:
image: otel/opentelemetry-collector-contrib:0.148.0
container_name: otel-collector
hostname: otel-collector
domainname: monitoring
restart: always
command:
- "--config=/etc/otelcol-contrib/config.yaml"
volumes:
- ./configs/otel-collector.yml:/etc/otelcol-contrib/config.yaml:ro
ports:
- "0.0.0.0:4317:4317"
- "0.0.0.0:4318:4318"
- "0.0.0.0:13133:13133"
depends_on:
loki:
condition: service_started
mimir:
condition: service_started
tempo:
condition: service_started
deploy:
resources:
limits:
memory: 512M
networks:
- monitoring
grafana:
image: grafana/grafana:10.4.1
container_name: grafana
hostname: grafana
environment:
- GF_SECURITY_ADMIN_USER=${GF_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_ADMIN_PASSWORD}
- GF_SERVER_DOMAIN=monitoring.jojoaddison.local
- GF_SERVER_ROOT_URL=http://monitoring.jojoaddison.local/
ports:
- "127.0.0.1:3000:3000"
volumes:
- grafana-data:/var/lib/grafana
# Provisioning Configuration
- ./configs/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
- ./configs/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml
# Dashboard JSON files
- ./configs/dashboards:/etc/grafana/provisioning/dashboards/json
deploy:
resources:
limits:
memory: 512M
networks:
- monitoring
networks:
monitoring:
driver: bridge
name: monitoring
external: true
volumes:
minio-data:
loki-data:
mimir-data:
tempo-data:
grafana-data: