homelab/server/config/pihole/docker-compose.yml

39 lines
1.1 KiB
YAML
Raw Normal View History

2022-07-13 22:54:57 -07:00
version: '3'
services:
pihole:
2022-07-13 22:55:31 -07:00
image: pihole/pihole
2022-07-13 22:54:57 -07:00
container_name: pihole_pihole
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
2022-07-14 15:22:44 -07:00
keep-file: "true"
2022-07-13 22:54:57 -07:00
restart: "no"
environment:
PUID: ${PUID}
PGID: ${PGID}
2022-07-13 23:25:35 -07:00
TZ: ${TZ}
WEBPASSWORD: ${SECRET_WEBPASSWORD}
ADMIN_EMAIL: ${ADMIN_EMAIL}
PIHOLE_DNS_: 1.1.1.1;1.0.0.1
VIRTUAL_HOST: https://pihole.jafner.net
2022-07-13 22:54:57 -07:00
volumes:
- ${DOCKER_DATA}/pihole:/etc/pihole
- ${DOCKER_DATA}/dnsmasq:/etc/dnsmasq.d
labels:
- traefik.http.routers.pihole.rule=Host(`pihole.jafner.net`)
- traefik.http.routers.pihole.tls.certresolver=lets-encrypt
- traefik.http.routers.pihole.middlewares=lan-only@file,pihole
2022-07-13 22:54:57 -07:00
- traefik.http.services.pihole.loadbalancer.server.port=80
- traefik.http.middlewares.pihole.addprefix.prefix=/admin
2022-07-13 22:54:57 -07:00
networks:
- web
ports:
- "53:53/tcp"
- "53:53/udp"
networks:
web:
external: true