2025-02-04 12:57:06 +01:00

43 lines
1.1 KiB
YAML

version: "3"
services:
wireguard:
image: linuxserver/wireguard:latest
container_name: wireguard
cap_add:
- NET_ADMIN
volumes:
- ./config:/config
ports:
# port for wireguard-manager. this must be set here as the `wireguard-manager` container joins the network of this container and hasn't its own network over which it could publish the ports
- "5000:5000"
# port of the wireguard server
- "51820:51820/udp"
wireguard-manager:
image: swissmakers/wireguard-manager:latest
container_name: wireguard-manager
depends_on:
- wireguard
cap_add:
- NET_ADMIN
# use the network of the 'wireguard' service. this enables to show active clients in the status page
network_mode: service:wireguard
environment:
- SENDGRID_API_KEY
- EMAIL_FROM_ADDRESS
- EMAIL_FROM_NAME
- SESSION_SECRET
- WGM_USERNAME=admin
- WGM_PASSWORD=admin
- WG_CONF_TEMPLATE
- WGM_MANAGE_START=true
- WGM_MANAGE_RESTART=true
logging:
driver: json-file
options:
max-size: 50m
volumes:
- ./db:/app/db
- ./config:/etc/wireguard