Files
2023-12-05 19:39:32 -06:00

73 lines
1.9 KiB
YAML
Executable File

version: "3"
networks:
private_network:
ipam:
driver: default
config:
- subnet: 10.2.0.0/24
services:
unbound-wh:
container_name: unbound-wh
image: mvance/unbound:latest
restart: unless-stopped
volumes:
- ${DOCKERCONFIGS}/unbound:/opt/unbound/etc/unbound/
networks:
private_network:
ipv4_address: 10.2.0.200
wireguard-wh:
container_name: wireguard-wh
image: linuxserver/wireguard
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ} # Change to your timezone
- SERVERPORT=${SERVERPORT}
#- SERVERURL=my.ddns.net #optional - For use with DDNS (Uncomment to use)
- PEERS=${PEERS} # How many peers to generate for you (clients)
- PEERDNS=10.2.0.100 # Set it to point to pihole
- INTERNAL_SUBNET=10.6.0.0
cap_add:
- NET_ADMIN
depends_on: [unbound-wh, pihole-wh]
dns:
- 10.2.0.100 # Points to pihole
- 10.2.0.200 # Points to unbound
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
ports:
- ${SERVERPORT}:51820/udp
restart: unless-stopped
volumes:
- ${DOCKERCONFIGS}/wireguard:/config
- /lib/modules:/lib/modules
networks:
private_network:
ipv4_address: 10.2.0.3
pihole-wh:
container_name: pihole-wh
image: pihole/pihole:latest
environment:
- TZ=${TZ}
- WEBPASSWORD=${WEBPASSWORD} # Blank password - Can be whatever you want.
- ServerIP=10.2.0.100 # Internal IP of pihole
- DNS1=10.2.0.200 # Unbound IP
- DNS2=${SECONDARYDNS} # If we don't specify two, it will auto pick google.
cap_add:
- NET_ADMIN
depends_on: [unbound-wh]
dns:
- 127.0.0.1
- 10.2.0.200 # Points to unbound
restart: unless-stopped
volumes:
- ${DOCKERCONFIGS}/etc-pihole/:/etc/pihole/
- ${DOCKERCONFIGS}/etc-dnsmasq.d/:/etc/dnsmasq.d/
networks:
private_network:
ipv4_address: 10.2.0.100