-
-
Save negeric/95eac2760eaee4c8c36f180ab62f24ef to your computer and use it in GitHub Desktop.
Pi-Hole with DNSCrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TZ="America/New_York" | |
WEBPASSWORD="SuperSecretPassword" | |
DNS1="172.22.2.12#5300" | |
BIND_IP_PIHOLE="172.22.2.53" | |
BIND_IP_DNSCRYPT="172.22.2.12" | |
WEB_HOST="pi.domain.local" | |
WEB_PORT="80" | |
DNSMASQ_LISTENING="all" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TZ="America/New_York" | |
BIND_IP_DNSCRYPT="172.22.1.12" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
pihole: | |
container_name: pihole | |
image: pihole/pihole:latest | |
ports: | |
- "53:53/tcp" | |
- "53:53/udp" | |
#- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server | |
#- "80:80/tcp" | |
expose: | |
- "80/tcp" | |
env_file: | |
- ${PWD}/.env | |
volumes: | |
- ${PWD}/etc-pihole:/etc/pihole | |
cap_add: [] | |
#- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed | |
labels: # Only use if running behind Traefik | |
- "traefik.enable=true" | |
- "traefik.http.routers.dns.entrypoints=web,web-secure" | |
- "traefik.http.routers.dns.rule=Host(`${WEB_HOST}`)" | |
- "traefik.http.routers.dns.tls=true" | |
- "traefik.docker.network=traefik" | |
- "traefik.http.routers.dns.tls.certresolver=letsencrypt" | |
- "traefik.http.services.dns.loadbalancer.server.port=${WEB_PORT}" | |
restart: unless-stopped | |
depends_on: | |
- dnscrypt | |
networks: | |
traefik: | |
dnscrypt: | |
ipv4_address: ${BIND_IP_PIHOLE} | |
dnscrypt: | |
container_name: dnscrypt-proxy | |
image: klutchell/dnscrypt-proxy:latest | |
networks: | |
dnscrypt: | |
ipv4_address: ${BIND_IP_DNSCRYPT} | |
expose: | |
- "5300/udp" | |
- "5300/tcp" | |
ports: | |
- "5300:5300/udp" | |
- "5300:5300/tcp" | |
env_file: | |
- ${PWD}/.env-dnscrypt | |
volumes: | |
- './etc-dnscrypt-proxy:/config' | |
dns: | |
- 1.1.1.1 | |
- 1.0.0.1 | |
restart: unless-stopped | |
networks: | |
traefik: | |
name: traefik | |
external: true | |
dnscrypt: | |
driver: bridge | |
external: true | |
ipam: | |
config: | |
- subnet: 172.22.2.0/24 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment