1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Updated Design: Runnable Project (markdown)

Dave Conway-Jones 2018-03-23 12:17:43 +00:00
parent c5162007e0
commit 900551251e

@ -32,7 +32,9 @@ When deploying the project, there will also be a need to have the runtime settin
We should also have an example Dockerfile that can be used to build and run a project.
> DCJ: Here is an example that works with resin.io - note that the flow file is set as an ENV variable (for now) (and the package.json needs node red as a dependency)
> DCJ: Here is an example that works with resin.io - note that the flow file is set using the start command in package.json, and it needs node red as a dependency)
"scripts": {"start": "node node_modules/node-red/red.js flow.json"},
```# base-image for node on any machine using a template variable,
# see more about dockerfile templates here: http://docs.resin.io/deployment/docker-templates/
@ -54,16 +56,14 @@ RUN JOBS=MAX npm install --production --unsafe-perm --no-optional && npm cache c
COPY . ./
ENV INITSYSTEM on
ENV FLOWS=flow.json
ENV NODE_PATH=/usr/src/app/node_modules
EXPOSE 1880
CMD ["npm", "start", "node_modules/node-red/red.js"]```
A really minimal Dockerfile to build an image 9but not run) could be as simple as
A really minimal Dockerfile to build an image (but not run) could be as simple as
```FROM node:8-onbuild
ENV FLOWS=flow.json
VOLUME /root/.node-red
EXPOSE 1880```