Berry revised this gist . Go to revision
1 file changed, 63 insertions
gistfile1.txt(file created)
@@ -0,0 +1,63 @@ | |||
1 | + | version: "3" | |
2 | + | ||
3 | + | services: | |
4 | + | wireguard: | |
5 | + | image: lscr.io/linuxserver/wireguard:latest | |
6 | + | container_name: wireguard | |
7 | + | cap_add: | |
8 | + | - NET_ADMIN | |
9 | + | - SYS_MODULE | |
10 | + | environment: | |
11 | + | - PUID=1026 | |
12 | + | - PGID=100 | |
13 | + | - TZ=Europe/Bratislava | |
14 | + | volumes: | |
15 | + | - /volume1/docker/wireguard:/config | |
16 | + | ports: | |
17 | + | - "5000:5000" | |
18 | + | - "51820:51820/udp" | |
19 | + | sysctls: | |
20 | + | - net.ipv4.conf.all.src_valid_mark=1 | |
21 | + | restart: always | |
22 | + | ||
23 | + | wireguard-ui: | |
24 | + | image: ngoduykhanh/wireguard-ui:latest | |
25 | + | container_name: wireguard-ui | |
26 | + | depends_on: | |
27 | + | - wireguard | |
28 | + | cap_add: | |
29 | + | - NET_ADMIN | |
30 | + | network_mode: service:wireguard | |
31 | + | environment: | |
32 | + | - TZ=Europe/Bratislava | |
33 | + | - EMAIL_FROM_ADDRESS=YOUR@EMAIL.COM | |
34 | + | - EMAIL_FROM_NAME=WireGuard | |
35 | + | - SMTP_PORT=587 | |
36 | + | - SMTP_USERNAME=YOUR@EMAIL.COM | |
37 | + | - SMTP_PASSWORD=EMAIL_PASSWORD | |
38 | + | - SMTP_ENCRYPTION=STARTTLS | |
39 | + | - SMTP_HOSTNAME=smtp.mail.com | |
40 | + | - SMTP_AUTH_TYPE=LOGIN | |
41 | + | - SESSION_SECRET=ANY_LONG_STRING | |
42 | + | - WGUI_USERNAME=admin | |
43 | + | - WGUI_PASSWORD=admin | |
44 | + | - WGUI_MANAGE_START=true | |
45 | + | - WGUI_MANAGE_RESTART=true | |
46 | + | - 'WGUI_SERVER_POST_UP_SCRIPT=iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE' | |
47 | + | - 'WGUI_SERVER_POST_DOWN_SCRIPT=iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE' | |
48 | + | - WGUI_SERVER_LISTEN_PORT=51820 | |
49 | + | - 'WGUI_DEFAULT_CLIENT_ALLOWED_IPS=0.0.0.0/0,::/0' | |
50 | + | - WGUI_ENDPOINT_ADDRESS=IP or DNS name | |
51 | + | - WGUI_MTU=none | |
52 | + | - WGUI_PERSISTENT_KEEPALIVE=none | |
53 | + | - WGUI_SERVER_INTERFACE_ADDRESSES=10.0.110.0/24 | |
54 | + | - WGUI_DNS=1.1.1.1 | |
55 | + | - WGUI_LOG_LEVEL=INFO | |
56 | + | logging: | |
57 | + | driver: json-file | |
58 | + | options: | |
59 | + | max-size: 50m | |
60 | + | volumes: | |
61 | + | - /volume1/docker/wireguard/ui:/app/db | |
62 | + | - /volume1/docker/wireguard:/etc/wireguard | |
63 | + | restart: always |
Newer
Older