WooCommerce API nodes for Node-RED

This commit is contained in:
2026-10-14 23:18:22 +02:00
commit e3b89fc74c
17 changed files with 1049 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
# Install woocommerce nodes into /data at runtime.
# /data is a Docker volume that masks build-time COPY.
set -eu
SRC="/opt/nextcloud-nodes/node-red-contrib-nextcloud-woocommerce"
DST_DIR="/data/node_modules"
DST="$DST_DIR/node-red-contrib-nextcloud-woocommerce"
if [ ! -d "$SRC" ]; then
echo "[entrypoint] ERROR: source directory missing: $SRC" >&2
ls -la /opt || true
ls -la /opt/nextcloud-nodes || true
exit 1
fi
mkdir -p "$DST_DIR"
rm -rf "$DST"
cp -a "$SRC" "$DST_DIR/"
if [ ! -f "$DST/package.json" ]; then
echo "[entrypoint] ERROR: install did not produce $DST/package.json" >&2
ls -la /data || true
ls -la "$DST_DIR" || true
exit 1
fi
chown -R node-red:node-red /data "$DST_DIR" "$DST" || true
chmod -R a+rX "$DST" || true
export NODE_RED_USER_DIR=/data
exec node-red --userDir /data