-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
164 lines (153 loc) · 3.88 KB
/
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
---
version: "3"
networks:
observability:
services:
grafana:
image: grafana/grafana:latest
environment:
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
depends_on:
- loki-gateway
entrypoint:
- sh
- -euc
- /run.sh
ports:
- "3000:3000"
volumes:
- ./infra/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/ds.yaml:ro
- ./infra/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/default.yaml
- ./infra/dashboards/:/etc/grafana/provisioning/dashboards/json/
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/api/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- observability
otel-collector:
image: otel/opentelemetry-collector:latest
command: --config=/etc/otel-collector.yaml
volumes:
- ./infra/otel-collector.yaml:/etc/otel-collector.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
depends_on:
- tempo
networks:
- observability
tempo:
image: grafana/tempo:2.3.1
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./infra/tempo-config.yaml:/etc/tempo.yaml
- ./infra/.data/tempo:/tmp/tempo
ports:
- "9411:9411" # zipkin
- "3200:3200" # tempo
restart: on-failure
depends_on:
- minio
- prometheus
networks:
- observability
prometheus:
image: prom/prometheus:latest
command:
- --config.file=/etc/prometheus.yaml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
volumes:
- ./infra/prometheus.yaml:/etc/prometheus.yaml
ports:
- "9090:9090"
networks:
- observability
loki-gateway:
image: nginx:latest
depends_on:
- read
- write
entrypoint:
- sh
- -euc
- /docker-entrypoint.sh nginx -g "daemon off;"
ports:
- "3100:3100"
volumes:
- ./infra/nginx.conf:/etc/nginx/nginx.conf
healthcheck:
test: [ "CMD", "service", "nginx", "status" ]
interval: 10s
timeout: 5s
retries: 5
networks:
- observability
read:
image: grafana/loki:2.9.2
command: "-config.file=/etc/loki/config.yaml -target=read"
ports:
- "3101:3100"
- "7946"
- "9095"
volumes:
- ./infra/loki-config.yaml:/etc/loki/config.yaml
depends_on:
- minio
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
networks: &loki-dns
observability:
aliases:
- loki
write:
image: grafana/loki:2.9.2
command: "-config.file=/etc/loki/config.yaml -target=write"
ports:
- "3102:3100"
- "7946"
- "9095"
volumes:
- ./infra/loki-config.yaml:/etc/loki/config.yaml
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3100/ready || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
depends_on:
- minio
networks:
<<: *loki-dns
minio:
image: minio/minio
entrypoint:
- sh
- -euc
- |
mkdir -p /data/loki-data && \
mkdir -p /data/loki-ruler && \
mkdir -p /data/tempo-data && \
minio server /data
environment:
- MINIO_ROOT_USER=observability
- MINIO_ROOT_PASSWORD=supersecret
- MINIO_PROMETHEUS_AUTH_TYPE=public
- MINIO_UPDATE=off
ports:
- "9000"
volumes:
- ./infra/.data/minio:/data
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 15s
timeout: 20s
retries: 5
networks:
- observability