From 437aa8fe2566666144480903520c64fe91b135d6 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 24 Aug 2022 06:05:46 +0200 Subject: [PATCH] Add subdomain for pihole and route it through traefik. --- networking/docker-compose.yaml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/networking/docker-compose.yaml b/networking/docker-compose.yaml index c3e9ae6..598f7c6 100644 --- a/networking/docker-compose.yaml +++ b/networking/docker-compose.yaml @@ -43,7 +43,8 @@ services: TZ: "Europe/Berlin" WEBPASSWORD: "lmaa,dw." PIHOLE_DNS_: 192.168.178.3;192.168.178.3 - VIRTUAL_HOST: pihole.lan + VIRTUAL_HOST: pihole.fam-steinle.de + CORS_HOSTS: homer.fam-steinle.de mac_address: d0:ca:ab:cd:ef:01 networks: home: @@ -58,6 +59,21 @@ services: volumes: - pihole:/etc/pihole/ - dnsmasq:/etc/dnsmasq.d/ + labels: + - "traefik.enable=true" + - "traefik.http.routers.pihole.entrypoints=web" + - "traefik.http.routers.pihole.rule=Host(`pihole.fam-steinle.de`)" + - "traefik.http.routers.pihole.middlewares=pihole" + - "traefik.http.middlewares.pihole.redirectscheme.scheme=https" + - "traefik.http.routers.pihole-secure.entrypoints=websecure" + - "traefik.http.routers.pihole-secure.rule=Host(`pihole.fam-steinle.de`)" + - "traefik.http.routers.pihole-secure.middlewares=pihole-secure" + - "traefik.http.middlewares.pihole-secure.headers.addvaryheader=true" + - "traefik.http.middlewares.pihole-secure.headers.accesscontrolalloworiginlist=https://homer.fam-steinle.de" + - "traefik.http.routers.pihole-secure.service=pihole-secure" + - "traefik.http.routers.pihole-secure.tls=true" + - "traefik.http.routers.pihole-secure.tls.certresolver=infomaniak" + - "traefik.http.services.pihole-secure.loadbalancer.server.port=80" unbound: image: mvance/unbound