move pihole to nfs

This commit is contained in:
Pim Kunis 2023-06-15 08:26:34 +02:00
parent 32c090eed7
commit 932b930567
2 changed files with 25 additions and 8 deletions

View file

@ -10,6 +10,10 @@ nfs_shares:
path: /mnt/data/freshrss/data
- name: freshrss_extensions
path: /mnt/data/freshrss/extensions
- name: pihole_data
path: /mnt/data/pihole/data
- name: pihole_dnsmasq
path: /mnt/data/pihole/dnsmasq
database_passwords:
nextcloud: !vault |

View file

@ -1,11 +1,23 @@
# vi: ft=yaml
version: "3"
version: "3.8"
networks:
traefik:
external: true
pihole:
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"
services:
pihole:
image: pihole/pihole:latest
@ -18,18 +30,19 @@ services:
WEBPASSWORD: {{ pihole_password }}
PIHOLE_DNS_: '192.168.30.1'
volumes:
- type: bind
source: /mnt/data/pihole/data
- type: volume
source: data
target: /etc/pihole
- type: bind
source: /mnt/data/pihole/dnsmasq
volume:
nocopy: true
- type: volume
source: dnsmasq
target: /etc/dnsmasq.d
volume:
nocopy: true
networks:
- traefik
deploy:
placement:
constraints:
- "node.labels.pihole == true"
labels:
- traefik.enable=true
- traefik.http.routers.pihole.entrypoints=localsecure