Files

90 lines
2.4 KiB
YAML
Raw Permalink Normal View History

2020-09-03 05:02:51 +00:00
version: "3"
networks:
private_network:
2020-09-03 05:02:51 +00:00
ipam:
driver: default
config:
2020-09-08 23:28:35 +00:00
- subnet: 10.2.0.0/24
2020-09-03 05:02:51 +00:00
services:
unbound:
2023-01-10 18:07:19 +07:00
image: "klutchell/unbound"
container_name: unbound
restart: unless-stopped
2020-09-08 23:28:35 +00:00
hostname: "unbound"
networks:
private_network:
2020-09-08 23:28:35 +00:00
ipv4_address: 10.2.0.200
wg-easy:
depends_on: [unbound, pihole]
2020-09-03 05:02:51 +00:00
environment:
# ⚠️ Required:
# Change this to your host's public address
- WG_HOST= my.ddns.net
- PASSWORD=10h30
2021-09-22 23:59:18 +07:00
- WG_PORT=51820
- WG_DEFAULT_ADDRESS=10.6.0.x
- WG_DEFAULT_DNS=10.2.0.100
2023-12-27 19:47:43 +07:00
# Optional:
# - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24
# - WG_INTERFACE=wg0
# - WG_MTU=1420
# - WG_ALLOWED_IPS=192.168.15.0/24, 10.0.1.0/24
2023-12-27 19:47:43 +07:00
# - WG_PERSISTENT_KEEPALIVE=25
# - WG_PRE_UP=echo "Pre Up" > /etc/wireguard/pre-up.txt
# - WG_POST_UP=echo "Post Up" > /etc/wireguard/post-up.txt
# - WG_PRE_DOWN=echo "Pre Down" > /etc/wireguard/pre-down.txt
# - WG_POST_DOWN=echo "Post Down" > /etc/wireguard/post-down.txt
2024-08-13 19:21:29 +08:00
image: ghcr.io/wg-easy/wg-easy:13
container_name: wg-easy
2020-09-03 05:02:51 +00:00
volumes:
- .:/etc/wireguard
2020-09-03 05:02:51 +00:00
ports:
2021-09-22 23:44:28 +07:00
- "51820:51820/udp"
- "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
dns:
2020-09-08 23:28:35 +00:00
- 10.2.0.100 # Points to pihole
- 10.2.0.200 # Points to unbound
2020-09-03 05:02:51 +00:00
networks:
private_network:
2020-09-08 23:28:35 +00:00
ipv4_address: 10.2.0.3
2020-09-03 05:02:51 +00:00
pihole:
depends_on: [unbound]
container_name: pihole
image: pihole/pihole:latest
restart: unless-stopped
2020-09-08 23:28:35 +00:00
hostname: pihole
dns:
2020-09-04 22:28:55 +00:00
- 127.0.0.1
2020-09-08 23:28:35 +00:00
- 10.2.0.200 # Points to unbound
2020-09-03 05:02:51 +00:00
environment:
TZ: "Asia/Hong_Kong"
2025-04-01 08:54:35 +09:00
FTLCONF_webserver_api_password: "" # Blank password - Can be whatever you want.
FTLCONF_dns_listeningMode: 'all'
2022-12-25 17:13:19 +07:00
ServerIP: 10.2.0.100 # Internal IP of pihole
2020-09-08 23:28:35 +00:00
DNS1: 10.2.0.200 # Unbound IP
DNS2: 10.2.0.200 # If we don't specify two, it will auto pick google.
2020-09-03 05:02:51 +00:00
# Volumes store your data between container upgrades
volumes:
- "./etc-pihole/:/etc/pihole/"
- "./etc-dnsmasq.d/:/etc/dnsmasq.d/"
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
networks:
private_network:
2021-09-30 09:54:29 +07:00
ipv4_address: 10.2.0.100