docker-rpi/pihole/pihole.yaml
2021-01-23 10:55:13 +01:00

59 lines
1.3 KiB
YAML

version: "3.4"
services:
pihole:
image: pihole/pihole:latest
ports:
- target: 53
published: 53
protocol: tcp
mode: host
- target: 53
published: 53
protocol: udp
mode: host
- target: 67
published: 67
protocol: udp
mode: host
environment:
TZ: 'Europe/Warsaw'
DNS1: "8.8.8.8"
DNS2: "1.1.1.1"
cap_add:
- CAP_NET_BIND_SERVICE
- NET_ADMIN
networks:
- external
- traefik-net
volumes:
- pihole_etc:/etc/pihole/
- pihole_dnsmasq:/etc/dnsmasq.d/
- "/etc/resolv.conf:/etc/resolv.conf:ro"
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: any
delay: 5s
labels:
traefik.enable: "true"
traefik.frontend.rule: "Host:${HOST}"
traefik.port: 80
traefik.frontend.entryPoints: localhttp,localhttps
traefik.docker.network: traefik-net
traefik.frontend.headers.STSSeconds: 63072000
traefik.frontend.headers.STSIncludeSubdomains: "true"
traefik.frontend.headers.STSPreload: "true"
volumes:
pihole_dnsmasq:
pihole_etc:
networks:
external:
traefik-net:
external: true
### Environment variables
# HOST