feat(service): enable password protection for the Wireguard Ul

This commit is contained in:
Nicanor Alexander de la Cruz Caba
2025-07-18 11:03:40 -04:00
committed by GitHub
parent 40407bae68
commit 7c85b80703

View File

@@ -8,11 +8,11 @@ services:
wg-easy: wg-easy:
image: ghcr.io/wg-easy/wg-easy:latest image: ghcr.io/wg-easy/wg-easy:latest
environment: environment:
- SERVICE_FQDN_WIREGUARDEASY_8000 - SERVICE_FQDN_WIREGUARDEASY_51821
- WG_HOST=${SERVICE_FQDN_WIREGUARDEASY} - WG_HOST=${SERVICE_FQDN_WIREGUARDEASY}
- LANG=${LANG:-en} - LANG=${LANG:-en}
- PORT=8000
- WG_PORT=51820 - WG_PORT=51820
- _PASSWORD=${SERVICE_PASSWORD_ADMIN}
volumes: volumes:
- wg-easy:/etc/wireguard - wg-easy:/etc/wireguard
ports: ports:
@@ -23,3 +23,9 @@ services:
sysctls: sysctls:
- net.ipv4.conf.all.src_valid_mark=1 - net.ipv4.conf.all.src_valid_mark=1
- net.ipv4.ip_forward=1 - net.ipv4.ip_forward=1
entrypoint:
- /bin/bash
- -c
- |
eval "wgpw '${SERVICE_PASSWORD_ADMIN}' > /pass-hash"
eval "$(cat /pass-hash) dumb-init node server.js"