version: "3.7" #volumes: # pihole: services: pihole: image: pihole/pihole:latest container_name: "mason-ph" hostname: "pihole" # user: "root:root" ports: - "53:53/udp" - "53:53/tcp" - "80:80" # - target: 53 # published: 53 # protocol: tcp # - target: 53 # published: 53 # protocol: udp # - target: 80 # published: 8053 # protocol: tcp # network_mode: "host" volumes: - type: bind source: /pihole_data target: /etc/pihole # - pihole:/etc/pihole # - "/home/ansible/stacks/lighttpd/external.conf:/etc/lighttpd/external.conf" # - dnsmasq:/etc/dnsmasq.d # depends_on: # - cloudflared restart: always environment: TZ: Europe/Amsterdam # - "DNS1=1.1.1.1" # - "REV_SERVER=true" # - "REV_SERVER_CIDR=192.168.1.0/24" #Update these fields to match your environment # - "REV_SERVER_TARGET=192.168.1.1" # - "REV_SERVER_DOMAIN=home.local" WEBPASSWORD: 'password' # networks: # - web # deploy: # mode: global # replicas: 1 # placement: # constraints: # - "node.labels.dns==true" pihole_exporter: image: ekofr/pihole-exporter container_name: pihole_exporter expose: - 9617 environment: PIHOLE_HOSTNAME: pihole # PIHOLE_PORT: 8053 PIHOLE_PASSWORD: password INTERVAL: 30s PORT: 9617 restart: always # deploy: # labels: # - "traefik.enable=false" # mode: replicated # replicas: 1 # placement: # constraints: # - "node.hostname==swarm-master" networks: web: # external: true name: web