-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
147 lines (136 loc) · 4.29 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
version: "3.3"
services:
traefik:
image: "traefik:latest"
container_name: traefik
hostname: traefik
restart: unless-stopped
ports:
- '80:80'
- '443:443'
- '853:853'
env_file:
- ".env"
command:
- "--log.level=ERROR"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.dnsovertls.address=:853"
- "--entrypoints.dns.address=:5053"
- "--entrypoints.udpdns.address=:5053/udp"
- "--entrypoints.web.address=:80"
- "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true"
- "--certificatesresolvers.mytlschallenge.acme.email=${EMAIL}"
- "--certificatesresolvers.mytlschallenge.acme.storage=./letsencrypt/acme.json"
networks:
dns:
ipv4_address: 10.0.0.4
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
cloudflared:
container_name: cloudflared
hostname: cloudflared
image: visibilityspots/cloudflared
restart: unless-stopped
networks:
dns:
ipv4_address: 10.0.0.2
pihole:
image: pihole/pihole:latest
container_name: pihole
hostname: pihole
networks:
dns:
ipv4_address: 10.0.0.3
environment:
PIHOLE_DNS_: 10.0.0.2#5054;10.0.0.2#5054
PUID: '1000'
PGID: '1000'
TZ: 'Asia/Kolkata'
WEBPASSWORD: '${PASSWORD}'
DNSSEC: 'true'
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
dns:
- 1.1.1.1
restart: unless-stopped
ports:
- "5053:53/tcp"
- "5053:53/udp"
labels:
- "traefik.enable=true"
# web interface
- "traefik.http.routers.pihole.rule=Host(`pihole.${DOMAIN}`)"
- "traefik.http.routers.pihole.entrypoints=websecure"
- "traefik.http.routers.pihole.tls.certresolver=mytlschallenge"
- "traefik.http.services.pihole.loadbalancer.server.port=80"
# DNS-over-TLS
- "traefik.tcp.routers.dnsovertls.rule=HostSNI(`pihole.${DOMAIN}`)"
- "traefik.tcp.routers.dnsovertls.entrypoints=dnsovertls"
- "traefik.tcp.routers.dnsovertls.tls.certresolver=mytlschallenge"
- "traefik.tcp.routers.dnsovertls.service=pihole"
# Normal DNS coming in on 53 TCP, no TLS
- "traefik.tcp.routers.dns.rule=HostSNI(`pihole.${DOMAIN}`)"
- "traefik.tcp.routers.dns.entrypoints=dns"
- "traefik.tcp.routers.dns.service=pihole"
# recieves traffic from both the TLS and non-TLS traefik routers
- "traefik.tcp.services.pihole.loadbalancer.server.port=53"
# Normal DNS coming in on 53 UDP
- "traefik.udp.routers.udpdns.entrypoints=udpdns"
- "traefik.udp.routers.udpdns.service=pihole"
- "traefik.udp.services.pihole.loadbalancer.server.port=5053"
wg-easy:
image: ghcr.io/wg-easy/wg-easy
container_name: wg-easy
hostname: wg-easy
environment:
- WG_HOST=129.146.242.54
- PASSWORD=pass2300
volumes:
- ./config:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.wg.rule=Host(`wireguard.${DOMAIN}`)"
- "traefik.http.routers.wg.entrypoints=websecure"
- "traefik.http.routers.wg.tls.certresolver=mytlschallenge"
- "traefik.http.services.wg.loadbalancer.server.port=51821"
networks:
dns:
ipv4_address: 10.0.0.5
portainer:
image: portainer/portainer-ce
hostname: portainer
container_name: portainer
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer:/data
labels:
- "traefik.enable=true"
- "traefik.http.routers.portainer.rule=Host(`portainer.${DOMAIN}`)"
- "traefik.http.routers.portainer.entrypoints=web,websecure"
- "traefik.http.routers.portainer.tls.certresolver=mytlschallenge"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
networks:
dns:
ipv4_address: 10.0.0.6
networks:
dns:
name: dns
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/29