-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.grafana.yml
116 lines (110 loc) · 2.91 KB
/
docker-compose.grafana.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
---
services:
prometheus:
image: prom/prometheus:${GRAFANA__PROMETHEUS_VERSION}
command: --enable-feature=remote-write-receiver
restart: unless-stopped
mem_limit: 512MB
ports:
- 9090:9090
container_name: prometheus
hostname: prometheus
environment: []
networks:
- oam
volumes:
- promdata:/prometheus
- ./grafana/prometheus/prometheus.yml:/prometheus/prometheus.yml
healthcheck:
interval: 5s
retries: 20
test: wget -O- -q http://localhost:9090/api/v1/status/runtimeinfo | grep -q '"status":"success"'
grafana:
image: grafana/grafana-oss:${GRAFANA__GRAFANA_VERSION}
restart: unless-stopped
mem_limit: 512MB
depends_on:
- grafana-otelcollector
ports:
- 3000:3000
container_name: grafana
hostname: grafana
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA__INITIAL_PASSWORD}
GF_FEATURE_TOGGLES_ENABLE: tempoSearch tempoBackendSearch
GF_DATABASE_WAL: true
networks:
- oam
volumes:
- grafanadata:/var/lib/grafana
- ./grafana/grafana/provisioning/:/etc/grafana/provisioning/
healthcheck:
interval: 5s
retries: 20
test: wget -O- -q --server-response http://admin:$$GRAFANA__PROMETHEUS_VERSION@localhost:3000/api/health 2>&1 | awk '/HTTP\//{ print $2 }' | grep 200
loki:
image: grafana/loki:${GRAFANA__LOKI_VERSION}
command: -config.file=/etc/loki/config.yml
restart: unless-stopped
mem_limit: 512MB
container_name: loki
hostname: loki
networks:
- oam
volumes:
- lokidata:/loki
- ./grafana/loki:/etc/loki
healthcheck:
interval: 5s
retries: 20
test: wget -O- -q http://localhost:3100/ready | grep -q 'ready'
tempo:
image: grafana/tempo:${GRAFANA__TEMPO_VERSION}
command: -config.file=/etc/tempo/config.yml
restart: unless-stopped
mem_limit: 512MB
ports:
- 9411:9411
container_name: tempo
hostname: tempo
networks:
- oam
volumes:
# https://github.com/grafana/tempo/issues/1657
# - tempodata:/tmp/tempo
- ./grafana/tempo:/etc/tempo
healthcheck:
interval: 5s
retries: 20
test: wget -O- -q http://localhost:3100/ready | grep -q 'ready'
grafana-otelcollector:
image: otel/opentelemetry-collector-contrib:${OTEL__COLLECTOR_VERSION}
restart: unless-stopped
mem_limit: 128MB
depends_on:
prometheus:
condition: service_healthy
loki:
condition: service_healthy
tempo:
condition: service_healthy
ports:
- 4317:4317
container_name: grafana-otelcollector
hostname: grafana-otelcollector
networks:
- oam
volumes:
- ./grafana/otelcol:/etc/otelcol-contrib
networks:
oam:
volumes:
grafanadata:
driver: local
promdata:
driver: local
lokidata:
driver: local
tempodata:
driver: local