-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
98 lines (94 loc) · 3.31 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
91
92
93
94
95
96
97
98
version: "3.9"
networks:
private_network:
ipam:
driver: default
config:
- subnet: ${SERVICES_SUBNET:-10.43.0.0/24}
volumes:
wg-access-server-data:
driver: local
etc-pihole-data:
driver: local
etc-dnsmasq-data:
driver: local
services:
unbound:
image: "klutchell/unbound:latest"
container_name: unbound
restart: unless-stopped
hostname: "unbound"
environment:
- "TZ=${TIME_ZONE:-Etc/Utc}"
volumes:
- "./unbound:/opt/unbound/etc/unbound"
networks:
private_network:
ipv4_address: ${UNBOUND_LOCAL_IP:-10.43.0.2}
pihole:
depends_on: [unbound]
container_name: pihole
image: pihole/pihole:latest
restart: unless-stopped
hostname: pihole
dns:
- 127.0.0.1
- ${UNBOUND_LOCAL_IP:-10.43.0.2} # Points to unbound
environment:
- "TZ=${TIME_ZONE:-Etc/Utc}"
- "WEBPASSWORD=${PI_HOLE_PASSWORD}" # Blank password - Can be whatever you want.
- "ServerIP=${PI_HOLE_LOCAL_IP:-10.43.0.3}" # Internal IP of pihole
- "DNS1=${UNBOUND_LOCAL_IP:-10.43.0.2}" # Unbound IP
- "DNS2=${UNBOUND_LOCAL_IP:-10.43.0.2}" # If we don't specify two, it will auto pick google.
volumes:
- "etc-pihole-data:/etc/pihole/"
- "etc-dnsmasq-data:/etc/dnsmasq.d/"
cap_add:
- NET_ADMIN
networks:
private_network:
ipv4_address: ${PI_HOLE_LOCAL_IP:-10.43.0.3}
wg-access-server:
depends_on: [unbound, pihole]
image: ghcr.io/freifunkmuc/wg-access-server:latest
container_name: wg-access-server
hostname: wg-access-server
cap_add:
- NET_ADMIN
volumes:
- "wg-access-server-data:/data"
- "/lib/modules:/lib/modules:ro"
environment:
- "TZ=${TIME_ZONE:-Etc/Utc}"
- "WG_WIREGUARD_PRIVATE_KEY=${WG_WIREGUARD_PRIVATE_KEY:?set the WG_WIREGUARD_PRIVATE_KEY environment variable}"
- "WG_ADMIN_USERNAME=${WG_ADMIN_USERNAME:-admin@vpn}"
- "WG_ADMIN_PASSWORD=${WG_ADMIN_PASSWORD:?set the WG_ADMIN_PASSWORD environment variable}"
- "WG_WIREGUARD_PORT=${WG_WIREGUARD_PORT:-51820}"
- "WG_PORT=${WG_PORT:-8000}"
- "WG_LOG_LEVEL=${WG_LOG_LEVEL:-info}"
- "WG_STORAGE=${WG_STORAGE:-sqlite3:///data/db.sqlite3}"
- "WG_DISABLE_METADATA=${WG_DISABLE_METADATA:-false}"
- "WG_FILENAME=${WG_FILENAME:-NikaVpnClient}"
- "WG_WIREGUARD_INTERFACE=${WG_WIREGUARD_INTERFACE:-wg0}"
- "WG_VPN_CIDR=${WG_VPN_CIDR:-10.254.253.0/24}"
- "WG_VPN_CIDRV6=${WG_VPN_CIDRV6:-0}"
- "WG_IPV4_NAT_ENABLED=${WG_IPV4_NAT_ENABLED:-true}"
- "WG_IPV6_NAT_ENABLED=${WG_IPV6_NAT_ENABLED:-false}"
- "WG_VPN_ALLOWED_IPS=${WG_VPN_ALLOWED_IPS:-0.0.0.0/0,::/0}"
- "WG_DNS_ENABLED=${WG_DNS_ENABLED:-true}"
- "WG_DNS_UPSTREAM=${PI_HOLE_LOCAL_IP:-10.43.0.3}"
- "WG_DNS_DOMAIN=${WG_DNS_DOMAIN}"
- "WG_EXTERNAL_HOST=${WG_EXTERNAL_HOST}"
- "WG_VPN_CLIENT_ISOLATION=${WG_VPN_CLIENT_ISOLATION:-false}"
ports:
- "${WG_PORT:-8000}:${WG_PORT:-8000}/tcp"
- "${WG_WIREGUARD_PORT:-51820}:${WG_WIREGUARD_PORT:-51820}/udp"
devices:
- "/dev/net/tun:/dev/net/tun"
restart: unless-stopped
networks:
private_network:
ipv4_address: ${WG_LOCAL_IP:-10.43.0.4}
dns:
- ${PI_HOLE_LOCAL_IP:-10.43.0.3} # Points to pihole
- ${UNBOUND_LOCAL_IP:-10.43.0.2} # Points to unbound