-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
226 lines (212 loc) · 5.57 KB
/
docker-compose.yaml
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
version: "3.8"
volumes:
minio_data: {}
prometheus_data: {}
grafana_data: {}
cortex-data: {}
mimir-1-data: {}
mimir-2-data: {}
mimir-3-data: {}
networks:
prometheus-integration: {}
services:
minio:
image: minio/minio
container_name: minio
hostname: minio
entrypoint: [""]
command:
[
"sh",
"-c",
"mkdir -p /data/mimir && minio server /data --console-address ':9001'",
]
ports:
- 9001:9001
networks:
- prometheus-integration
environment:
- MINIO_ROOT_USER=mimir
- MINIO_ROOT_PASSWORD=supersecret
volumes:
- minio_data:/data
alertmanager:
container_name: alertmanager
hostname: alertmanager
image: prom/alertmanager:v0.26.0
volumes:
- ./alertmanager.yaml:/etc/alertmanager/alertmanager.yaml:ro
command:
- --config.file=/etc/alertmanager/alertmanager.yaml
ports:
- 9093:9093
networks:
- prometheus-integration
prometheus:
container_name: prometheus
hostname: prometheus
restart: always
image: prom/prometheus:v2.45.2
volumes:
- ./prometheus-config.yaml:/etc/prometheus/prometheus.yaml:ro
- ./prometheus-alert-rules.yaml:/etc/prometheus/alert-rules.yaml:ro
- prometheus_data:/prometheus
command:
- --web.enable-lifecycle
- --config.file=/etc/prometheus/prometheus.yaml
links:
- alertmanager
- node-exporter
ports:
- 9090:9090
networks:
- prometheus-integration
node-exporter:
image: prom/node-exporter:v1.7.0
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- --path.procfs=/host/proc
- --path.rootfs=/rootfs
- --path.sysfs=/host/sys
- --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)
ports:
- 9100:9100
networks:
- prometheus-integration
grafana:
container_name: grafana
hostname: grafana
restart: always
image: grafana/grafana:10.0.10
depends_on:
- prometheus
- loki
- mimir
links:
- prometheus
- loki
- mimir
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
- ./grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:ro
- ./prometheus-dashboard.json:/var/lib/grafana/dashboards/prometheus/overview.json:ro
- ./node-exporter-dashboard.json:/var/lib/grafana/dashboards/node-exporter/overview.json:ro
- ./loki-dashboard.json:/var/lib/grafana/dashboards/loki/overview.json:ro
- ./grafana-config.ini:/etc/grafana/config.ini:ro
- grafana_data:/var/lib/grafana
ports:
- 3000:3000
environment:
GF_USERS_ALLOW_SIGN_UP: false
GF_AUTH_ANONYMOUS_ENABLED: true
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
networks:
- prometheus-integration
loki:
image: grafana/loki:2.9.0
container_name: loki
hostname: loki
ports:
- 3100:3100
command: -config.file=/etc/loki/config.yaml
volumes:
- ./loki-config.yaml:/etc/loki/config.yaml:ro
- ./loki-alert-rules.yaml:/etc/alertmanager/fake/alert-rules.yaml:ro
depends_on:
- prometheus
networks:
- prometheus-integration
promtail:
image: grafana/promtail:2.9.0
container_name: promtail
hostname: promtail
volumes:
- ./promtail-config.yaml:/etc/promtail/config.yaml:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock
command: -config.file=/etc/promtail/config.yaml
depends_on:
- loki
networks:
- prometheus-integration
cortex:
image: quay.io/cortexproject/cortex:v1.16.0
container_name: cortex
hostname: cortex
command:
- -config.file=/etc/cortex.yaml
depends_on:
- minio
ports:
- 9010:9010
volumes:
- ./cortex-config.yaml:/etc/cortex.yaml:ro
- ./cortex-alert-rules.yaml:/etc/alertmanager/fake/alert-rules.yaml:ro
- cortex-data:/data
networks:
- prometheus-integration
mimir:
image: nginx:latest
container_name: mimir
hostname: mimir
volumes:
- ./mimir-nginx.conf:/etc/nginx/nginx.conf:ro
links:
- mimir-1
- mimir-2
- mimir-3
depends_on:
- mimir-1
- mimir-2
- mimir-3
ports:
- 9009:9009
networks:
- prometheus-integration
mimir-1:
image: grafana/mimir:2.11.0
container_name: mimir-1
hostname: mimir-1
command:
- -config.file=/etc/mimir.yaml
depends_on:
- minio
volumes:
- ./mimir-config.yaml:/etc/mimir.yaml:ro
- ./mimir-alert-rules.yaml:/etc/alertmanager/fake/alert-rules.yaml:ro
- mimir-1-data:/data
networks:
- prometheus-integration
mimir-2:
image: grafana/mimir:2.11.0
container_name: mimir-2
hostname: mimir-2
command:
- -config.file=/etc/mimir.yaml
depends_on:
- minio
volumes:
- ./mimir-config.yaml:/etc/mimir.yaml:ro
- ./mimir-alert-rules.yaml:/etc/alertmanager/fake/alert-rules.yaml:ro
- mimir-2-data:/data
networks:
- prometheus-integration
mimir-3:
image: grafana/mimir:2.11.0
container_name: mimir-3
hostname: mimir-3
command:
- -config.file=/etc/mimir.yaml
depends_on:
- minio
volumes:
- ./mimir-config.yaml:/etc/mimir.yaml:ro
- ./mimir-alert-rules.yaml:/etc/alertmanager/fake/alert-rules.yaml:ro
- mimir-3-data:/data
networks:
- prometheus-integration