-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdocker-compose.yml
64 lines (59 loc) · 1.55 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
services:
# Initialize the server
mc:
image: itzg/minecraft-server
environment:
EULA: "true"
MEMORY: 2G
ports:
- "25565:25565"
volumes:
- mc-data:/data
# Initialize the monitor
monitor:
image: itzg/mc-monitor
command: ['collect-otel', '-otel-collector-endpoint=otel_collector:4317','-otel-collector-timeout=35s']
environment:
EXPORT_SERVERS: mc
DEBUG: "true"
depends_on:
- mc
# Prometheus
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-tsdb:/prometheus
depends_on:
- monitor
# Grafana
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- grafana-lib:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
- ./dashboards:/etc/grafana/dashboards
depends_on:
- prometheus
environment:
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
# OTel Collector
otel_collector:
image: otel/opentelemetry-collector-contrib
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC Receiver
- "8888:8888" # Metrics Exporter
- "8889:8889" # Prometheus Exporter
volumes:
mc-data:
prometheus-tsdb:
grafana-lib: