From 204e90dd3bdda75bdfcabc246f7894dde73e4671 Mon Sep 17 00:00:00 2001 From: bunker-admin Date: Wed, 25 Mar 2026 15:32:53 -0600 Subject: [PATCH] Fix config.sh: read embed ports from .env for Homepage services.yaml Rocket.Chat and Jitsi embed ports were hardcoded in the Homepage services.yaml generation. Now reads from .env so multi-instance deployments with custom ports get correct Homepage dashboard links. Bunker Admin --- config.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/config.sh b/config.sh index 5475bb0..7b2d0a8 100755 --- a/config.sh +++ b/config.sh @@ -603,9 +603,21 @@ generate_nginx_configs() { # Homepage services.yaml # ============================================================================= +# Read a variable from .env with fallback default +read_env_var() { + local key=$1 default=$2 + local val + val=$(grep "^${key}=" "$ENV_FILE" 2>/dev/null | head -1 | cut -d= -f2-) + echo "${val:-$default}" +} + generate_services_yaml() { local domain="${CONFIGURED_DOMAIN:-cmlite.org}" + # Read embed proxy ports from .env (supports multi-instance port customization) + local rc_port; rc_port=$(read_env_var ROCKETCHAT_EMBED_PORT 8891) + local jitsi_port; jitsi_port=$(read_env_var JITSI_EMBED_PORT 8893) + mkdir -p "$(dirname "$SERVICES_YAML")" cat > "$SERVICES_YAML" << YAML @@ -868,14 +880,14 @@ generate_services_yaml() { - Rocket.Chat: icon: mdi-chat - href: "http://localhost:8891" - description: Team chat (port 8891) + href: "http://localhost:$rc_port" + description: Team chat (port $rc_port) container: rocketchat-changemaker - Jitsi Meet: icon: mdi-video - href: "http://localhost:8893" - description: Video conferencing (port 8893) + href: "http://localhost:$jitsi_port" + description: Video conferencing (port $jitsi_port) container: jitsi-web-changemaker - Local - Integrations: