diff --git a/pihole/pihole.yaml b/pihole/pihole.yaml index 411d386..3de511d 100644 --- a/pihole/pihole.yaml +++ b/pihole/pihole.yaml @@ -1,7 +1,7 @@ version: "3.4" services: pihole: - image: pihole/pihole:latest + image: pihole/pihole ports: - target: 53 published: 53 @@ -24,6 +24,7 @@ services: - NET_ADMIN networks: - external + - internal - traefik-net volumes: - pihole_etc:/etc/pihole/ @@ -45,6 +46,23 @@ services: traefik.frontend.headers.STSIncludeSubdomains: "true" traefik.frontend.headers.STSPreload: "true" + pihole_exporter: + image: ekofr/pihole-exporter:v0.0.11 + environment: + PIHOLE_HOSTNAME: "pihole" + PIHOLE_API_TOKEN: "${PIHOLEAPITOKEN}" + INTERVAL: "30s" + PORT: "9617" + networks: + - internal + - prometheus_prometheus-net + deploy: + mode: replicated + replicas: 1 + restart_policy: + condition: any + delay: 5s + volumes: pihole_dnsmasq: @@ -52,8 +70,14 @@ volumes: networks: external: + internal: + driver: overlay + internal: true traefik-net: external: true + prometheus_prometheus-net: + external: true ### Environment variables -# HOST \ No newline at end of file +# HOST +# PIHOLEAPITOKEN \ No newline at end of file