From b5555160a2b156c3dfd9306797957f548a977fa4 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Fri, 23 Mar 2018 13:07:50 +0000 Subject: [PATCH] Updated Design: Runnable Project (markdown) --- Design:-Runnable-Project.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Design:-Runnable-Project.md b/Design:-Runnable-Project.md index 603b01a..ec88d45 100644 --- a/Design:-Runnable-Project.md +++ b/Design:-Runnable-Project.md @@ -16,7 +16,7 @@ We can't quite do this today. Here are the missing pieces: 1. the project's `package.json` needs to list `node-red` as a dependency. On balance, I think this is the right approach, rather than treat node-red as an assumed prerequisite. I don't think we should do this be default; maybe add a checkbox in the project settings' dependencies page to include `node-red`. > DCJ: Yes - agree it should be a dependency. 2. it must be possible to point node-red at a project on start-up, without using the editor to do so. Currently we overload the flowFile argument to set the active project - but that only works if the project is 'known'. It would be better to point at a `projectDir` wherever it may exist. -> DCJ: Are we pointing Node-RED or npm start ? Which are we calling to run it ? If npm start then don't we already have to be in the correct project directory ? +> DCJ: Are we pointing Node-RED or npm start ? Which are we calling to run it ? If npm start then don't we already have to be in the correct project directory ? (or use npm start --prefix projdir) 3. it must be possible to provide the credentialSecret for the project without it being part of any of the version controlled files. Options for this include: - env var - `NODE_RED_CREDENTIAL_SECRET` - command-line flag - `--credentialSecret="..."` @@ -60,7 +60,7 @@ ENV NODE_PATH=/usr/src/app/node_modules EXPOSE 1880 -CMD ["npm", "start", "node_modules/node-red/red.js"]``` +CMD ["npm", "start"]``` A really minimal Dockerfile to build an image (but not run) could be as simple as