Make admin web UI port configurable via WEB_PORT
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
6a3b627311
commit
b683fad5d8
@@ -25,6 +25,9 @@ WG_RELAY_SUBNETS=
|
||||
# Set true to block peer-to-peer traffic between VPN clients (isolation).
|
||||
WG_PEER_ISOLATION=false
|
||||
|
||||
# Port the admin web UI listens on (host port, since network_mode: host).
|
||||
WEB_PORT=8000
|
||||
|
||||
# Admin panel login
|
||||
ADMIN_USERNAME=admin
|
||||
ADMIN_PASSWORD=password
|
||||
|
||||
+3
-1
@@ -6,7 +6,8 @@ services:
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
# Host networking: new interfaces and their UDP ports work without
|
||||
# editing port mappings. The admin UI listens on host port 8000.
|
||||
# editing port mappings. The admin UI listens on host port WEB_PORT
|
||||
# (default 8000).
|
||||
# Requires net.ipv4.ip_forward=1 on the host (sysctls cannot be set
|
||||
# per-container in host network mode); entrypoint.sh enables it.
|
||||
network_mode: host
|
||||
@@ -21,6 +22,7 @@ services:
|
||||
WG_ALLOWED_IPS: ${WG_ALLOWED_IPS:-0.0.0.0/0, ::/0}
|
||||
WG_RELAY_SUBNETS: ${WG_RELAY_SUBNETS:-}
|
||||
WG_PEER_ISOLATION: ${WG_PEER_ISOLATION:-false}
|
||||
WEB_PORT: ${WEB_PORT:-8000}
|
||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD in .env}
|
||||
SECRET_KEY: ${SECRET_KEY:?set SECRET_KEY in .env}
|
||||
|
||||
+1
-1
@@ -23,4 +23,4 @@ for subnet in ${WG_RELAY_SUBNETS:-}; do
|
||||
done
|
||||
IFS="$OLD_IFS"
|
||||
|
||||
exec uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
exec uvicorn app.main:app --host 0.0.0.0 --port "${WEB_PORT:-8000}"
|
||||
|
||||
Reference in New Issue
Block a user