Skip to content

Commit

Permalink
fix: update Dockerfile to use correct Node-RED module installation
Browse files Browse the repository at this point in the history
- Install package globally first
- Copy from global modules to Node-RED data directory
- Ensure correct permissions
  • Loading branch information
vveerrgg committed Dec 25, 2024
1 parent f805521 commit cdc0f80
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cdc0f80

Please sign in to comment.