This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/pihole/docker-stack.yml.j2

58 lines
1.4 KiB
Text
Raw Permalink Normal View History

2023-05-10 09:30:20 +00:00
# vi: ft=yaml
2023-06-15 06:26:34 +00:00
version: "3.8"
2023-05-10 09:30:20 +00:00
networks:
traefik:
external: true
pihole:
2023-06-15 06:26:34 +00:00
volumes:
data:
driver_opts:
type: "nfs"
o: "addr=192.168.30.10,nolock,soft,rw"
device: ":/mnt/data/pihole/data"
dnsmasq:
driver_opts:
type: "nfs"
o: "addr=192.168.30.10,nolock,soft,rw"
device: ":/mnt/data/pihole/dnsmasq"
2023-05-10 09:30:20 +00:00
services:
pihole:
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
network_mode: "host"
environment:
TZ: 'Europe/Amsterdam'
WEBPASSWORD: {{ pihole_password }}
PIHOLE_DNS_: '192.168.30.1'
volumes:
2023-06-15 06:26:34 +00:00
- type: volume
source: data
2023-05-10 09:30:20 +00:00
target: /etc/pihole
2023-06-15 06:26:34 +00:00
volume:
nocopy: true
- type: volume
source: dnsmasq
2023-05-10 09:30:20 +00:00
target: /etc/dnsmasq.d
2023-06-15 06:26:34 +00:00
volume:
nocopy: true
2023-05-10 09:30:20 +00:00
networks:
- traefik
deploy:
labels:
- traefik.enable=true
- traefik.http.routers.pihole.entrypoints=localsecure
2023-07-12 16:17:25 +00:00
- traefik.http.routers.pihole.rule=Host(`pihole.kun.is`)
2023-05-10 09:30:20 +00:00
- traefik.http.routers.pihole.tls=true
- traefik.http.routers.pihole.tls.certresolver=letsencrypt
- traefik.http.routers.pihole.service=pihole
- traefik.http.services.pihole.loadbalancer.server.port=80
- traefik.docker.network=traefik
2023-12-26 09:49:19 +00:00
placement:
constraints:
- node.role == manager