59 lines
2.3 KiB
YAML
59 lines
2.3 KiB
YAML
# Exporter + Prometheus + Grafana with the dashboard ready.
|
|
#
|
|
# cp .env.example .env # fill in: port of the radio, repeater, password
|
|
# docker compose up -d
|
|
# open http://localhost:3000 (admin / GRAFANA_PASSWORD from .env)
|
|
#
|
|
# Already have Prometheus and Grafana? You do not need this file: run only the
|
|
# exporter (README, section "Jen exportér").
|
|
|
|
services:
|
|
exporter:
|
|
image: git.rfa.cz/tth-pub/meshcore-exporter:${MC_VERSION:-latest}-${MC_ARCH:-amd64}
|
|
# build: .. # or build it from this checkout instead
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
# USB companion: MC_SERIAL_HOST in .env is mapped here. Without one
|
|
# (openHop companion over TCP) /dev/null stands in and nothing uses it.
|
|
# openHop on this machine: docker-compose.host.yml (see .env.example).
|
|
devices:
|
|
- "${MC_SERIAL_HOST:-/dev/null}:/dev/meshcore"
|
|
# The serial port's group on the host (`stat -c %g /dev/ttyACM0`):
|
|
# dialout = 20 on Debian/Ubuntu/Raspberry Pi OS, uucp = 986 on Arch.
|
|
group_add:
|
|
- "${MC_SERIAL_GID:-20}"
|
|
# Per-repeater passwords: put them in repeaters.toml (see
|
|
# repeaters.example.toml), set MC_CONFIG=/config/repeaters.toml in .env
|
|
# and uncomment the volume:
|
|
volumes: []
|
|
# - ./repeaters.toml:/config/repeaters.toml:ro
|
|
|
|
prometheus:
|
|
image: prom/prometheus:v3.16.0@sha256:e04987641b57704f408e31f6373ba4138ecf27cb4a165d24aabb6c38fddd0f06
|
|
restart: unless-stopped
|
|
command:
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
- --storage.tsdb.path=/prometheus
|
|
- --storage.tsdb.retention.time=${PROMETHEUS_RETENTION:-400d}
|
|
volumes:
|
|
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus:/prometheus
|
|
|
|
grafana:
|
|
image: grafana/grafana:13.3.0@sha256:488984b716c0862639f91a698adbe2862677a5a07bad42da5f03f3030883b205
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${GRAFANA_PORT:-3000}:3000"
|
|
environment:
|
|
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:?set GRAFANA_PASSWORD in .env}
|
|
GF_ANALYTICS_REPORTING_ENABLED: "false"
|
|
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH: /var/lib/grafana/dashboards/meshcore-repeater.json
|
|
volumes:
|
|
- ./grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ../dashboards:/var/lib/grafana/dashboards:ro
|
|
- grafana:/var/lib/grafana
|
|
|
|
volumes:
|
|
prometheus:
|
|
grafana:
|