here we go

This commit is contained in:
Luigi Oliveira 2023-06-13 19:01:58 -03:00
parent 81ff087828
commit e8441bccce

View file

@ -1,35 +1,17 @@
version: "3.8" version: "3.8"
services: services:
wireguard: wireguard-ui:
image: linuxserver/wireguard:latest image: ngoduykhanh/wireguard-ui:latest
container_name: wireguard container_name: wireguard-ui
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
- SYS_MODULE - SYS_MODULE
sysctls: sysctls:
- net.ipv4.ip_forward=1 - net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1 - net.ipv4.conf.all.src_valid_mark=1
volumes: # required to show active clients. with this set, you don't need to expose the ui port (5000) anymore
- ./config:/config network_mode: host
ports:
# port for wireguard-ui. this must be set here as the `wireguard-ui` 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
- "51821:51821/udp"
environment:
- PEERS
- SERVERPORT=51821
wireguard-ui:
image: ngoduykhanh/wireguard-ui:latest
container_name: wireguard-ui
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: environment:
- SENDGRID_API_KEY - SENDGRID_API_KEY
- EMAIL_FROM_ADDRESS - EMAIL_FROM_ADDRESS
@ -38,12 +20,12 @@ services:
- WGUI_USERNAME=admin - WGUI_USERNAME=admin
- WGUI_PASSWORD=admin - WGUI_PASSWORD=admin
- WG_CONF_TEMPLATE - WG_CONF_TEMPLATE
- WGUI_MANAGE_START=true - WGUI_MANAGE_START=false
- WGUI_MANAGE_RESTART=true - WGUI_MANAGE_RESTART=false
logging: logging:
driver: json-file driver: json-file
options: options:
max-size: 50m max-size: 50m
volumes: volumes:
- ./db:/app/db - ./db:/app/db
- ./config:/etc/wireguard - /etc/wireguard:/etc/wireguard