Updated Design: Runnable Project (markdown)

Dave Conway-Jones 2018-04-05 15:05:36 +01:00
parent 7fc6822721
commit de8d37bce9
1 changed files with 6 additions and 4 deletions

@ -23,6 +23,7 @@ We can't quite do this today. Here are the missing pieces:
- env var - `NODE_RED_CREDENTIAL_SECRET`
- [DCJ] easy to add to settings.js - `credentialSecret: process.env.NODE_RED_CREDENTIAL_SECRET` and would suit Docker style deploy.
- command-line flag - `--credentialSecret="..."`
- [DCJ] added as option to runnable-project dev branch
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.
@ -56,13 +57,14 @@ When deploying a project, it may also need to have credentials provided. Normall
We should also have an example Dockerfile that can be used to build and run a project.
> DCJ: Here is an example *Dockerfile.template* 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)
> DCJ: Here is an example *Dockerfile.template* that works with various flavours of Docker - 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/
# and about resin base images here: http://docs.resin.io/runtime/resin-base-images/
```
# Expects -e NODE_RED_CREDENTIAL_SECRET="my_secret_key" to be part of the docker run command at start time
# and settings.js to exist as per above
#
# Note the node:slim image doesn't have node-gyp
## Uncomment one of the following FROM lines to suit your environment