From 8c623005fcbe28c67a4e1efdbcb7fc634a46fca4 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 28 Mar 2018 13:41:35 +0100 Subject: [PATCH] add read-only issue 4 --- Design:-Runnable-Project.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Design:-Runnable-Project.md b/Design:-Runnable-Project.md index 45f35e5..e956b7b 100644 --- a/Design:-Runnable-Project.md +++ b/Design:-Runnable-Project.md @@ -20,8 +20,10 @@ We can't quite do this today. Here are the missing pieces: 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="..."` +4. Must handle running in a read-only environment. If the package is installed globally (in order to insert a command link into /usr/bin) then the flow file and settings.js will be in root space - which ought not to be writable by the user. Currently even starting Node-RED with -u option pointing somewhere protected will fail. Options include - just handling the error. On error marking the settings.readOnly as true thus stopping the library failing. Setting disableEditor to true also. The package would provide an npm start script that runs node-red with the appropriate command-line args. +It could also provide a `bin` section that could allow starting via command line if installed globally. > DCJ: If you run the steps above then node-red and other modules will be installed *below* the CWD in node_modules... all good. If however we want to take our project dir and npm pack it... on re-installing it the project itself will also be in the node_modules dir thus making npm start (or pathing back to node-red) trickier.