You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.4 KiB

version: "3"
services:
pihole:
image: pihole/pihole:latest
restart: unless-stopped
hostname: pihole-nuc
ports:
- "53:53/tcp"
- "53:53/udp"
networks:
management-services:
pihole:
ipv4_address: 172.31.255.250
environment:
TZ: 'Asia/Kolkata'
WEBPASSWORD: 'pihole'
PIHOLE_DNS_: 172.17.0.1#5053
REV_SERVER: "true"
REV_SERVER_TARGET: 10.10.10.1
REV_SERVER_CIDR: 10.10.10.0/24
VIRTUAL_HOST: pihole-nuc.adyanth.site
IPv6: "false"
SKIPGRAVITYONBOOT: "true"
CORS_HOSTS: home.adyanth.lan,home.adyanth.site
volumes:
- "/home/adyanth/docker/data/adblock-dns/etc-pihole/:/etc/pihole/"
- "/home/adyanth/docker/data/adblock-dns/etc-dnsmasq:/etc/dnsmasq.d/"
- "./02-dns-server.conf:/etc/dnsmasq.d/02-dns-server.conf"
labels:
- traefik.enable=true
- traefik.docker.network=management-services
- traefik.http.services.pihole-webservice.loadbalancer.server.port=80
- traefik.http.routers.pihole.entrypoints=websecure
- traefik.http.routers.pihole.rule=HostRegexp(`pihole-{nuc|primary|secondary}.adyanth.{root:\w+}`) || HostRegexp(`10.10.10.25{vip:[34]}`)
- traefik.http.routers.pihole.tls
- traefik.http.routers.pihole.middlewares=pihole-cors
- traefik.http.routers.pihole.service=pihole-webservice
- traefik.http.middlewares.pihole-cors.headers.customresponseheaders.Access-Control-Allow-Credentials=true
- traefik.tcp.services.pihole-dotservice.loadbalancer.server.port=53
- traefik.tcp.routers.pihole-dot.entrypoints=dot
- traefik.tcp.routers.pihole-dot.rule=HostSNI(`*`)
- traefik.tcp.routers.pihole-dot.tls.certResolver=cf_acme_le
# https://github.com/traefik/traefik/issues/8123
- traefik.tcp.routers.pihole.service=pihole-dotservice
bind9:
image: internetsystemsconsortium/bind9:9.18
restart: unless-stopped
ports:
- "53535:53"
volumes:
- "./bind9/zone:/etc/bind/zone"
- "./bind9/named.conf.keys:/etc/bind/named.conf.keys"
- "./bind9/named.conf.local:/etc/bind/named.conf.local"
- "./bind9/named.conf.options:/etc/bind/named.conf.options"
networks:
pihole:
ipv4_address: 172.31.255.251
networks:
management-services:
external: true
pihole:
name: pihole
ipam:
driver: default
config:
- subnet: 172.31.255.248/29