2023-02-04 21:55:09 -08:00
|
|
|
---
|
|
|
|
version: '3.8'
|
|
|
|
|
|
|
|
services:
|
|
|
|
wireguard:
|
|
|
|
image: lscr.io/linuxserver/wireguard:latest
|
|
|
|
container_name: WireGuard
|
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
- SYS_MODULE
|
|
|
|
environment:
|
|
|
|
PUID: 1000
|
|
|
|
PGID: 1000
|
2023-02-15 18:44:39 -08:00
|
|
|
TZ: "{{ .user.timezone }}"
|
|
|
|
SERVERURL: "{{ .docker.wireguard.serverUrl }}"
|
2023-02-04 21:55:09 -08:00
|
|
|
SERVERPORT: 51820
|
|
|
|
PEERS: 1
|
|
|
|
PEERDNS: auto
|
2023-02-15 18:44:39 -08:00
|
|
|
INTERNAL_SUBNET: "{{ .docker.wireguard.internalSubnet }}"
|
|
|
|
ALLOWEDIPS: "{{ .docker.wireguard.internalSubnet }}/24"
|
2023-02-04 21:55:09 -08:00
|
|
|
LOG_CONFS: true
|
|
|
|
volumes:
|
|
|
|
- /srv/stacks/wireguard:/config
|
|
|
|
- /lib/modules:/lib/modules
|
|
|
|
ports:
|
|
|
|
- 51820:51820/udp
|
|
|
|
sysctls:
|
|
|
|
- net.ipv4.conf.all.src_valid_mark=1
|
|
|
|
restart: unless-stopped
|
|
|
|
deploy:
|
|
|
|
mode: global
|
|
|
|
|
|
|
|
networks:
|
|
|
|
agent_network:
|
|
|
|
driver: overlay
|
|
|
|
attachable: true
|
|
|
|
nginx_network:
|
|
|
|
external: true
|