From f9ab85e001cfc57ef83067973c23af9ffcb5a899 Mon Sep 17 00:00:00 2001 From: datadunia Date: Sat, 16 May 2026 02:56:35 +0700 Subject: [PATCH] feat(devops): make web port configurable via environment variables --- .env.example | 1 + docker-compose.yml | 2 +- setup.sh | 2 +- upgrade.sh | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 403dfa2..44f9316 100644 --- a/.env.example +++ b/.env.example @@ -21,6 +21,7 @@ SERVER_SALT=GantiDenganKunciGaramUntukWireGuard256Bit NFTABLES_TABLE=nexusguard IPAM_POOL=10.8.0.0/16 API_PORT=8080 +WEB_PORT=80 # 5. Dashboard UI (Frontend Build Configuration) # URL API yang akan diakses oleh web browser client diff --git a/docker-compose.yml b/docker-compose.yml index a435cd6..4b8288c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: # Inject the root .env variable into the frontend build process VITE_API_BASE_URL: ${VITE_API_BASE_URL} ports: - - "80:80" + - "${WEB_PORT:-80}:80" depends_on: - server-core restart: unless-stopped diff --git a/setup.sh b/setup.sh index 2dcf692..422a5e3 100755 --- a/setup.sh +++ b/setup.sh @@ -48,6 +48,6 @@ docker-compose up -d echo "======================================" echo " NexusGuard is successfully running! " -echo " Web Dashboard : http://localhost" +echo " Web Dashboard : http://localhost:${WEB_PORT:-80}" echo " API Port : ${API_PORT:-8080}" echo "======================================" diff --git a/upgrade.sh b/upgrade.sh index 10f054a..f6d8f5f 100755 --- a/upgrade.sh +++ b/upgrade.sh @@ -29,6 +29,6 @@ docker image prune -f echo "======================================" echo " Upgrade & Rebuild complete! " -echo " Dashboard : http://localhost" +echo " Dashboard : http://localhost:${WEB_PORT:-80}" echo " API Port : ${API_PORT:-8080}" echo "======================================"