fritzbox-grafana-monitor/docker-compose.yml

47 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2021-05-11 15:47:22 +00:00
---
version: '3'
services:
mon_prometheus:
image: prom/prometheus:latest
container_name: mon_prometheus
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- $PWD/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- mon_node-exporter
mon_grafana:
image: grafana/grafana:latest
container_name: mon_grafana
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- /var/docker/data/monitoring/grafana:/var/lib/grafana
ports:
- 3000:3000
user: "1000" # USER ID des Docker Users anpassen
depends_on:
- mon_prometheus
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.rule=Host(`grafana.example.com`)" # Domain anpassen
- "traefik.http.routers.grafana.tls=true"
- "traefik.http.routers.grafana.tls.certresolver=default"
- "traefik.http.routers.grafana.middlewares=secHeaders@file"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
networks:
- traefik_proxy
- default
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge