-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpi-hole.yml
72 lines (70 loc) · 1.82 KB
/
pi-hole.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: '3.7'
services:
pihole:
domainname: ${DOMAINNAME}
image: pihole/pihole:latest
dns:
- 127.0.0.1
- 192.168.1.1
- 1.1.1.1
ports:
- '0.0.0.0:53:53/tcp'
- '0.0.0.0:53:53/udp'
- '0.0.0.0:67:67/udp'
# - '0.0.0.0:80:80/tcp'
volumes:
# run `touch ${USERDIR}/pihole/pihole.log` first unless you like errors
- ${USERDIR}/pihole/pihole.log:/var/log/pihole.log
- ${USERDIR}/pihole/config:/etc/pihole/
- ${USERDIR}/pihole/dnsmasq.d:/etc/dnsmasq.d/
environment:
ServerIP: 192.168.1.51
IPv6: 'False'
PROXY_LOCATION: pihole
VIRTUAL_HOST: pihole.${DOMAINNAME}
VIRTUAL_PORT: 80
TZ: ${TZ}
WEBPASSWORD: "${PIPASS}"
DNSMASQ_LISTENING: all
PUID: 1000
PGID: 1000
extra_hosts:
# Point any of the jwilder virtual_host addresses
# to your docker host ip address
- 'pihole.${DOMAINNAME}:192.168.1.51'
networks:
- traefik
- piholenet
deploy:
mode: replicated
replicas: 1
endpoint_mode: vip
#Recommended, but not required.
# placement:
# constraints: [node.role == worker]
update_config:
parallelism: 1
order: stop-first
failure_action: rollback
monitor: 2m
delay: 15s
restart_policy:
condition: on-failure
labels:
traefik.enable: "true"
# https://www.techjunktrunk.com/docker/2017/11/03/traefik-default-server-catch-all/
traefik.frontend.rule: HostRegexp:pihole.skylarker.org,{catchall:.*}
traefik.frontend.priority: 1
traefik.backend: pihole
traefik.port: 80
networks:
traefik:
driver: overlay
attachable: true
name: traefik
external: true
piholenet:
driver: overlay
attachable: true
name: piholenet
external: false