Skip to content

Commit

Permalink
Merge pull request #145 from FlowFuse/persistent-storage
Browse files Browse the repository at this point in the history
Add storage path to /data
  • Loading branch information
knolleary authored Jul 4, 2024
2 parents 46c6a45 + b19c543 commit 15419fe
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions node-red-container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nodered/node-red:latest-18
FROM nodered/node-red:3.1.11-18

ARG REGISTRY
ARG REGISTRY_TOKEN
Expand All @@ -10,19 +10,28 @@ COPY healthcheck.js /healthcheck.js

COPY package.json /data
WORKDIR /data
RUN mkdir node_modules
RUN npm install

USER root
RUN mkdir -p /usr/local/ssl-certs

WORKDIR /usr/src/flowforge-nr-launcher
RUN chown node-red:node-red /data/* /usr/src/flowforge-nr-launcher
RUN chown -R node-red:node-red /usr/src/flowforge-nr-launcher

USER node-red
RUN npm install @flowfuse/nr-launcher@${BUILD_TAG}

USER root
RUN mkdir -p /data/storage
RUN chmod -R g+w /data/* /data/.npm/*
RUN chown -R node-red:root /data/* /data/.npm/*

USER node-red

ENV NODE_PATH=/usr/src/node-red
ENV HOME=/usr/src/node-red

EXPOSE 2880

ENTRYPOINT ["./node_modules/.bin/flowfuse-node-red", "-p", "2880", "-n", "/usr/src/node-red"]
ENTRYPOINT ["./node_modules/.bin/flowfuse-node-red", "-p", "2880", "-n", "/usr/src/node-red"]

0 comments on commit 15419fe

Please sign in to comment.