add grafana labels

This commit is contained in:
vdo 2022-05-31 14:12:44 +01:00
parent 1d641da19b
commit 720974857d
9 changed files with 5574 additions and 3 deletions

View file

@ -67,6 +67,50 @@ x-explorer-service: &explorer-service
- "traefik.http.routers.explorer.service=explorer"
- "traefik.http.services.explorer.loadbalancer.server.port=${EXPLORER_PORT}"
x-monero-exporter-service: &monero-exporter-service
monero-exporter:
command:
- --monero-addr=http://monerod:${MONEROD_RPC_PORT}
container_name: monero-exporter
image: utxobr/monero-exporter@sha256:737413b1054583535e835e1417b61a8d59a4c08723e4a15c61c4249c2a7d69a4
network_mode: service:monerod
x-grafana-service: &grafana-service
grafana:
command:
- -config=/etc/grafana/grafana.ini
container_name: grafana
image: grafana/grafana:${GRAFANA_TAG}
ports:
- 3000
volumes:
- ./config/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=(PathPrefix(`/grafana`) )" #!nole
# - "traefik.http.routers.grafana.rule=(Host(`${DOMAIN}`) && PathPrefix(`/grafana`) )" #!le
# - "traefik.http.routers.grafana.tls.certresolver=le" #!le
- "traefik.http.middlewares.stripprefix.stripprefix.prefixes=/grafana"
- "traefik.http.routers.grafana.middlewares=stripprefix"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls"
- "traefik.http.routers.grafana.service=grafana"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
x-prometheus-service: &prometheus-service
prometheus:
command:
- --config.file=/etc/prometheus/config.yaml
- --storage.tsdb.path=/data
- --storage.tsdb.retention.time=30d
container_name: prometheus
image: prom/prometheus:${PROMETHEUS_TAG}
volumes:
- prometheus-data:/data
- ./config/prometheus/config.yaml:/etc/prometheus/config.yaml:ro
x-watchtower-service: &watchtower-service
watchtower:
container_name: watchtower
@ -113,7 +157,14 @@ services:
# <<: *tor-service #!tor
# <<: *explorer-service #!explorer
<<: *monero-exporter-service #!monero-exporter
<<: *grafana-service #!grafana
<<: *prometheus-service #!prometheus
# <<: *watchtower-service #!watchtower
volumes:
monerod-data: {}
# tor-keys: {} #!tor
prometheus-data: {} #!prometheus