services: unbound: image: mvance/unbound:latest container_name: unbound-pihole-serenity network_mode: host restart: unless-stopped environment: TZ: ${TZ} UNBOUND_PORT: "5335" volumes: - ${APPDATA_UNBOUND_ROOT}:/opt/unbound/etc/unbound/ healthcheck: test: ["CMD-SHELL", "hex=$$(printf '%04X' \"$$UNBOUND_PORT\"); grep -qi \":$$hex\" /proc/net/tcp /proc/net/tcp6 || exit 1"] interval: 30s timeout: 10s retries: 6 start_period: 20s pihole: image: pihole/pihole:latest container_name: pihole-serenity network_mode: host restart: unless-stopped depends_on: unbound: condition: service_healthy environment: TZ: ${TZ} PIHOLE_WEB_PORT: ${SERENITY_PIHOLE_WEB_PORT} FTLCONF_webserver_api_password: ${PIHOLE_PASSWORD} FTLCONF_dns_listeningMode: "LOCAL" FTLCONF_dns_upstreams: "127.0.0.1#5335" FTLCONF_webserver_port: ${SERENITY_PIHOLE_WEB_PORT} volumes: - ${APPDATA_PIHOLE_ROOT}/etc-pihole:/etc/pihole - ${APPDATA_PIHOLE_ROOT}/etc-dnsmasq.d:/etc/dnsmasq.d cap_add: - SYS_NICE healthcheck: test: ["CMD-SHELL", "hex=$$(printf '%04X' \"$$PIHOLE_WEB_PORT\"); grep -qi \":$$hex\" /proc/net/tcp /proc/net/tcp6 || exit 1"] interval: 30s timeout: 10s retries: 6 start_period: 40s keepalived: image: osixia/keepalived:2.0.20 container_name: keepalived-pihole-serenity network_mode: host restart: unless-stopped depends_on: pihole: condition: service_healthy cap_add: - NET_ADMIN - NET_BROADCAST - NET_RAW volumes: - ./keepalived.conf:/usr/local/etc/keepalived/keepalived.conf:ro