forked from IAmStoxe/wirehole
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
99 lines (94 loc) · 2.58 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
99
version: "3"
networks:
private_network:
ipam:
driver: default
config:
- subnet: 10.2.0.0/24
services:
unbound:
image: "mvance/unbound-rpi:latest"
container_name: unbound
restart: unless-stopped
hostname: "unbound"
volumes:
- "./unbound:/opt/unbound/etc/unbound/"
networks:
private_network:
ipv4_address: 10.2.0.200
wireguard:
depends_on: [unbound, pihole]
image: linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=America/Toronto # Change to your timezone
- SERVERPORT=51820
- SERVERURL=jimaldon.com #optional - For use with DDNS (Uncomment to use)
- PEERS=5 # How many peers to generate for you (clients)
- PEERDNS=10.2.0.100 # Set it to point to pihole
- INTERNAL_SUBNET=10.5.0.0
volumes:
- "./wireguard:/config"
- "/lib/modules:/lib/modules"
ports:
- "51820:51820/udp"
dns:
- 10.2.0.100 # Points to pihole
- 10.2.0.200#53 # Points to unbound
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1
restart: unless-stopped
networks:
private_network:
ipv4_address: 10.2.0.3
dhcphelper:
build: ./dhcp-helper
container_name: dhcphelper
restart: unless-stopped
command: -s 10.2.0.100
#ports:
#- "67:67/udp"
cap_add:
- NET_ADMIN
network_mode: "host"
#networks:
#private_network:
#ipv4_address: 10.2.0.150
pihole:
depends_on: [unbound, dhcphelper]
container_name: pihole
image: jacklul/pihole:latest
restart: unless-stopped
hostname: pihole
dns:
- 127.0.0.1#53
- 10.2.0.200#53 # Points to unbound
environment:
TZ: "America/Toronto"
WEBPASSWORD: "" # Blank password - Can be whatever you want.
ServerIP: 10.2.0.100 # Internal IP of pihole
DNS1: 10.2.0.200#53 # Unbound IP
DNS2: 10.2.0.200#53 # If we don't specify two, it will auto pick google.
DNSMASQ_LISTENING: all
# Volumes store your data between container upgrades
volumes:
- "./etc-pihole/:/etc/pihole/"
- "./etc-dnsmasq.d/:/etc/dnsmasq.d/"
- "./etc-pihole-updatelists/:/etc/pihole-updatelists/"
ports:
- "80:80"
- "53:53/tcp"
- "53:53/udp"
# 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:
ipv4_address: 10.2.0.100