-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
90 lines (76 loc) · 3.1 KB
/
docker-compose.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: "4"
######### LEGEND #########
## - Notes
# - Commented-out code
##########################
## More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
cloudflared:
container_name: cloudflared
image: cloudflare/cloudflared:latest
restart: unless-stopped
command: proxy-dns
## See the list of environment variables at https://github.com/cloudflare/cloudflared/blob/master/cmd/cloudflared/proxydns/cmd.go
environment:
## Enter the 'DNS over HTTPS' URL you saved from STEP 6, if you took that step. Otherwise, leave as is
TUNNEL_DNS_UPSTREAM: "https://1.1.1.1/dns-query,https://1.0.0.1/dns-query"
## Listen on an unprivileged port
TUNNEL_DNS_PORT: 5053
## Listen on all interfaces
TUNNEL_DNS_ADDRESS: "0.0.0.0"
networks:
pihole_net:
## Cloudflared container IP
ipv4_address: "172.31.10.3"
pihole:
container_name: pihole
## Enter a fun and creative hostname!
hostname: d-room
image: pihole/pihole:latest
## For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
#- "67:67/udp" ## Only required if you are using Pi-hole as your DHCP server
## Web Admin Port
- "8061:80/tcp"
## See the list of environment variables at https://github.com/pi-hole/docker-pi-hole/#environment-variables
environment:
## You can get a list of time zones at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ: "America/New_York"
## I've added an interactive script to the 'build-pihole.sh' file that automates this step.
WEBPASSWORD_FILE: "/opt/pihole/web-password/password.txt"
IPv6: false
DHCP_ACTIVE: false
WEBUIBOXEDLAYOUT: boxed
QUERY_LOGGING: false
WEBTHEME: "default-darker"
PIHOLE_DNS_: "172.31.10.3#5053" ## Cloudflared container IP
#PIHOLE_DNS_: "1.1.1.1;1.0.0.1" ## alternate, if not taking the extra Cloudflare steps
## Volumes to store your data between container upgrades
volumes:
- "/opt/pihole:/etc/pihole"
- "/opt/pihole/dnsmasq.d:/etc/dnsmasq.d"
- "/opt/pihole/web-password:/etc/pihole/web-password"
## https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
#cap_add:
#- NET_ADMIN ## This is required for version 4.1 onwards
restart: unless-stopped
networks:
pihole_net:
## Pi-hole container IP
ipv4_address: "172.31.10.2"
networks:
pihole_net:
driver: bridge
enable_ipv6: false
ipam:
config:
- subnet: "172.31.10.0/29"
- gateway: "172.31.10.1"
#external: true
#name: "law-net"
## Reference the 'custom-network.sh' file, if you intend on going with a custom bridge or macvlan setup...
## Then, un-comment lines 83-84 and delete or comment out the "pihole_net" network declarations (lines 77-82)...
## Then, of course, you'll also need to update your IPs to match the subnet range you created.
## OR, you can delete everything below line 82, as well, if this ain't your jam!