-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
172 lines (160 loc) · 4.38 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
version: "3.8"
services:
caddy:
profiles: ["caddy"]
image: caddy:2.7.6-alpine
container_name: caddy
restart: always
ports:
- "80:80"
- "443:443"
network_mode: host
minio:
profiles: ["log", "trace"]
container_name: minio
image: minio/minio:latest
volumes:
- minio_data_volume:/data
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
ports:
- "9000:9000"
- "9001:9001"
command: server data --address ':9000' --console-address ':9001'
shm_size: "1gb"
createbuckets:
profiles: ["log", "trace"]
image: minio/mc
volumes:
- minio_data_volume:/data
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add minio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb data/loki-aws;
/usr/bin/mc mb data/loki-stage;
/usr/bin/mc mb data/tempo;
/usr/bin/mc anonymous set public data/tempo;
/usr/bin/mc anonymous set public data/loki-aws;
/usr/bin/mc anonymous set public data/loki-stage;
exit 0;
"
loki-stage:
profiles: ["log"]
image: grafana/loki:latest
container_name: loki-stage
environment:
- MINIO_ROOT_PASSWORD
- MINIO_ROOT_USER
ports:
- "3101:3100"
volumes:
- "$PWD/config/loki/loki-config-stage.yml:/etc/loki/loki-config.yml"
command: -config.file=/etc/loki/loki-config.yml -config.expand-env=true
depends_on:
- minio
restart: always
loki-aws:
profiles: ["log"]
image: grafana/loki:latest
container_name: loki-aws
environment:
- MINIO_ROOT_PASSWORD
- MINIO_ROOT_USER
ports:
- "3100:3100"
volumes:
- "$PWD/config/loki/loki-config-aws.yml:/etc/loki/loki-config.yml"
command: -config.file=/etc/loki/loki-config.yml -config.expand-env=true
depends_on:
- minio
restart: always
prometheus:
profiles: ["metric"]
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- "$PWD/config/prometheus/prometheus-config.yml:/etc/prometheus/prometheus-config.yml"
- "$PWD/config/prometheus/rules:/etc/prometheus/rules"
- prometheus_data_volume:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus-config.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-remote-write-receiver'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
alertmanager:
profiles: ["metric"]
image: prom/alertmanager
container_name: alertmanager
volumes:
- "$PWD/config/alertmanager/config.yml:/etc/alertmanager/config.yml"
command:
- '--config.file=/etc/alertmanager/config.yml'
ports:
- "9093:9093"
restart: always
prometheus-msteams:
profiles: ["metric"]
image: docker.io/bzon/prometheus-msteams:v1.1.4
container_name: prometheus-msteams
restart: always
environment:
- TEAMS_INCOMING_WEBHOOK_URL=${MS_WEBHOOK_URL}
- TEAMS_REQUEST_URI=alertmanager
expose:
- "2000"
check-instance:
profiles: ["metric"]
build: ./check-instance
environment:
- WEBHOOK_URL=${MS_WEBHOOK_URL}
container_name: check-instance
command: ["python", "check_instance.py"]
volumes:
- check_instance_data_volume:/app
depends_on:
- prometheus
restart: always
tempo:
profiles: ["trace"]
image: grafana/tempo:latest
container_name: tempo
environment:
- MINIO_ROOT_PASSWORD
- MINIO_ROOT_USER
ports:
- "3200:3200" # tempo
- "4317:4317" # otlp grpc
- "4318:4318" # otlp http
volumes:
- $PWD/config/tempo/tempo.yml:/etc/tempo.yml
command:
- "-config.file=/etc/tempo.yml"
- "-config.expand-env=true"
depends_on:
- minio
restart: always
grafana:
profiles: ["log", "trace", "metric"]
image: grafana/grafana:latest
env_file:
- .env
container_name: grafana
restart:
unless-stopped
ports:
- "3000:3000"
volumes:
- "grafana_storage:/var/lib/grafana"
- "$PWD/config/grafana/grafana.ini:/etc/grafana/grafana.ini"
volumes:
grafana_storage: {}
minio_data_volume:
prometheus_data_volume:
check_instance_data_volume: