-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (63 loc) · 2.56 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (63 loc) · 2.56 KB
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
######### LEGEND #########
## - Notes
# - Commented-out code
##########################
services:
cloudflared:
container_name: ${CLOUDFLARE_NAME}
image: cloudflare/cloudflared:latest
restart: unless-stopped
command: proxy-dns
environment:
TUNNEL_DNS_UPSTREAM: ${CLOUDFLARE_UPSTREAM}
TUNNEL_DNS_PORT: ${CLOUDFLARE_PORT}
## Listen on all interfaces
TUNNEL_DNS_ADDRESS: "0.0.0.0"
networks:
pihole_net:
ipv4_address: ${CLOUDFLARE_IP}
pihole:
container_name: ${PIHOLE_NAME}
## Enter a fun and creative hostname!
hostname: ${PIHOLE_NAME}
image: pihole/pihole:latest
## For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp" ## if you have, i.e., 'systemd-resolved' working in the background, it's best to disable it for Pi-hole to work most effectively...
- "53:53/udp" ## ... alternatively, you could use a non-standard port here (5353, etc.), but that is less ideal, as most devices will only check port 53 for DNS.
#- "67:67/udp" ## Only required if you are using Pi-hole as your DHCP server
## Web Admin Port
- "${PIHOLE_PORT}:80/tcp"
environment:
TZ: ${PIHOLE_TZ}
## I've added an interactive script to the 'build-pihole.sh' file that automates this step
IPv6: false
DHCP_ACTIVE: false
WEBUIBOXEDLAYOUT: boxed
QUERY_LOGGING: false
WEBTHEME: "default-darker"
FTLCONF_dns_upstreams: ${PIHOLE_DNS} ## add up to 2 additional DNS servers by separating with a semi-colon (;)... failover would, however, mean lack of DoH... the choice is yours
volumes:
- "${PIHOLE_VOLUME_DIR}:/etc/pihole"
- "${PIHOLE_VOLUME_DIR}/dnsmasq.d:/etc/dnsmasq.d"
## https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
#cap_add:
#- NET_ADMIN ## only required for DHCP
restart: unless-stopped
networks:
pihole_net:
ipv4_address: ${PIHOLE_IP}
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 64-65 and delete or comment out the "pihole_net" network declarations (lines 58-63)...
## 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 63, if this ain't your jam!