From fd4ace8c134b9b35afd550c336286a732efc0ed4 Mon Sep 17 00:00:00 2001 From: n3wk Date: Thu, 15 Oct 2026 12:47:00 +0200 Subject: [PATCH] Add port 1880 mapping verification to integrate script --- integrate-into-nodered.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/integrate-into-nodered.sh b/integrate-into-nodered.sh index a151d37..cd29de1 100644 --- a/integrate-into-nodered.sh +++ b/integrate-into-nodered.sh @@ -110,7 +110,18 @@ cp "$SCRIPT_DIR/nodes"/*.html "$OPT_NODES_DIR/$PACKAGE_NAME/nodes/" cp "$SCRIPT_DIR/nodes/package.json" "$OPT_NODES_DIR/$PACKAGE_NAME/package.json" echo " Package created." -# 5. No docker-compose.yml changes needed - nodes are baked into the image +# 5. Verify docker-compose.yml has port 1880 mapping +COMPOSE="$NODERED_DIR/docker-compose.yml" +if [[ -f "$COMPOSE" ]]; then + echo "[integrate] Checking docker-compose.yml for port 1880..." + if ! grep -q "1880:1880" "$COMPOSE"; then + cp "$COMPOSE" "$COMPOSE.bak.$(date +%s)" + sed -i '/ports:/a\ - "1880:1880"' "$COMPOSE" + echo " Added 1880:1880 port mapping." + else + echo " Port 1880 mapping already present." + fi +fi echo "" echo "=== Integration Complete ==="