-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
83 lines (78 loc) · 1.99 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
version: "3.3"
services:
caddy:
container_name: caddy
image: homeall/caddy-reverse-proxy-cloudflare:latest
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock" # needs socket to read events
- "./caddy-data:/data" # needs volume to back up certificates
ports:
- "80:80"
- "443:443"
labels: # Global options
caddy.email: your@email.com #Replace with your E-Mail address
networks:
backend:
ipv4_address: '172.31.0.69'
proxy-tier: {}
pihole:
container_name: pihole
image: pihole/pihole:latest
hostname: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
environment:
TZ: 'Europe/London'
WEBPASSWORD: 'admin'
DNS1: '172.31.0.53#54'
DNS2: 'no'
ServerIP: '172.31.0.100'
VIRTUAL_HOST: 'your.domain.net' #Replace with your domain
volumes:
- './etc-pihole/:/etc/pihole/'
depends_on:
- dhcphelper
cap_add:
- NET_ADMIN
restart: unless-stopped
labels:
caddy: pihole.ionut.vip
caddy.reverse_proxy: "{{upstreams 80}}"
caddy.tls.protocols: "tls1.3"
caddy.tls.ca: "https://acme-staging-v02.api.letsencrypt.org/directory" #Comment after you finished your testing.
caddy.tls.dns: "cloudflare $SCOPED-API-Token" # Replace with your API Token
networks:
backend:
ipv4_address: '172.31.0.100'
proxy-tier: {}
cloudflare:
restart: unless-stopped
container_name: cloudflare
image: homeall/cloudflared:latest
links:
- pihole
ports:
- "54:54/tcp"
- "54:54/udp"
networks:
backend:
ipv4_address: '172.31.0.53'
proxy-tier: {}
dhcphelper:
restart: unless-stopped
container_name: dhcphelper
network_mode: "host"
image: homeall/dhcphelper:latest
environment:
IP: '172.31.0.100'
cap_add:
- NET_ADMIN
networks:
backend:
ipam:
config:
- subnet: 172.31.0.0/16
proxy-tier:
external: true