From cdc0f8084c7378c9cd47f0fde5d1a066a491a93d Mon Sep 17 00:00:00 2001 From: vveerrgg Date: Tue, 24 Dec 2024 16:38:30 -0800 Subject: [PATCH] fix: update Dockerfile to use correct Node-RED module installation - Install package globally first - Copy from global modules to Node-RED data directory - Ensure correct permissions --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa8907a..a0c7b20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,10 @@ COPY . /tmp/node-red-contrib-nostr/ WORKDIR /tmp/node-red-contrib-nostr RUN npm install && \ npm run build && \ + npm install -g . && \ cd /data && \ - mkdir -p node_modules/node-red-contrib-nostr/nodes && \ - cp -r /tmp/node-red-contrib-nostr/dist/nodes/* /data/node_modules/node-red-contrib-nostr/nodes/ && \ - cp -r /tmp/node-red-contrib-nostr/dist/locales /data/node_modules/node-red-contrib-nostr/ && \ - cp /tmp/node-red-contrib-nostr/package.json /data/node_modules/node-red-contrib-nostr/ && \ + mkdir -p node_modules && \ + cp -r /usr/src/node-red/node_modules/node-red-contrib-nostr /data/node_modules/ && \ chown -R node-red:node-red /data USER node-red