diff --git a/integrate-into-nodered.sh b/integrate-into-nodered.sh index f4a8662..2f6f90e 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 ==="