Spaces:
Running
Running
File size: 3,293 Bytes
801f2d3 | 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 | # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# MicProtocol - Monitoring Stack (OTel, Loki, Prometheus, Grafana)
# Runs with --network host so all services are reachable at localhost
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
version: "3.8"
services:
# βββ Prometheus (Metrics) ββββββββββββββββββββββββββββββββββ
prometheus:
image: prom/prometheus:latest
container_name: micprotocol-prometheus
restart: unless-stopped
network_mode: host
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.console.libraries=/etc/prometheus/console_libraries
- --web.console.templates=/etc/prometheus/consoles
- --web.enable-lifecycle
- --web.listen-address=0.0.0.0:9090
# βββ Loki (Logs) βββββββββββββββββββββββββββββββββββββββββββ
loki:
image: grafana/loki:latest
container_name: micprotocol-loki
restart: unless-stopped
network_mode: host
ports:
- "3100:3100"
volumes:
- ./loki/loki-config.yaml:/etc/loki/local-config.yaml:ro
command: -config.file=/etc/loki/local-config.yaml
# βββ OpenTelemetry Collector (Traces + Metrics + Logs) βββββ
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: micprotocol-otel-collector
restart: unless-stopped
network_mode: host
ports:
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "8888:8888" # metrics endpoint
volumes:
- ./otel-collector/config.yaml:/etc/otel-collector/config.yaml:ro
command: ["--config=/etc/otel-collector/config.yaml"]
depends_on:
- prometheus
- loki
# βββ Grafana (Visualization) βββββββββββββββββββββββββββββββ
grafana:
image: grafana/grafana:latest
container_name: micprotocol-grafana
restart: unless-stopped
network_mode: host
ports:
- "3005:3000"
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
- GF_USERS_DEFAULT_THEME=dark
- GF_SERVER__HTTP_PORT=3005
volumes:
- ./grafana/datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml:ro
- ./grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
- loki
# βββ Volumes βββββββββββββββββββββββββββββββββββββββββββββββββ
volumes:
prometheus_data:
driver: local
grafana_data:
driver: local
|