version: "3" services: pihole: image: "pihole/pihole" container_name: "pihole" restart: "unless-stopped" cap_add: - NET_ADMIN dns: - "127.0.0.1" hostname: "${DOMAIN}" ports: - "53:53/tcp" - "53:53/udp" - "67:67/udp" environment: - "VIRTUAL_HOST=${DOMAIN}" - "DNSMASQ_LISTENING=all" env_file: ".env.pihole" volumes: - "./volumes/pihole/data:/etc/pihole" - "./volumes/pihole/dnsmasq.d:/etc/dnsmasq.d" - "./volumes/pihole/custom.list:/etc/pihole/custom.list" networks: - "traefik" labels: - "traefik.enable=true" - "traefik.http.routers.pihole.rule=Host(`${DOMAIN}`)" - "traefik.http.routers.pihole.entrypoints=web" - "traefik.http.services.pihole.loadbalancer.server.port=80" networks: traefik: name: "${TRAEFIK_NETWORK}"