steveternet/nuc/wireguard/docker-compose.yml

47 lines
848 B
YAML
Raw Normal View History

2023-12-24 18:54:49 +00:00
version: "3"
services:
wireguard:
image: ghcr.io/wg-easy/wg-easy:latest
2023-12-24 18:54:49 +00:00
restart: unless-stopped
container_name: wireguard
labels:
- "traefik.http.services.wireguard.loadbalancer.server.port=51821"
ports:
- target: 51820
published: 51820
protocol: tcp
mode: host
- target: 51820
published: 51820
protocol: udp
mode: host
2023-12-24 18:54:49 +00:00
volumes:
- wireguard_data:/etc/wireguard
2023-12-24 18:54:49 +00:00
environment:
- WG_HOST=wireguard.${DOMAIN_ROOT}
- PASSWORD=${UI_PASSWORD}
- DOMAIN_ROOT=${DOMAIN_ROOT}
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- "net.ipv4.conf.all.src_valid_mark=1"
- "net.ipv4.ip_forward=1"
networks:
- web
2023-12-24 18:54:49 +00:00
networks:
web:
external: true
2023-12-24 18:54:49 +00:00
volumes:
wireguard_data:
external: true