diff --git a/node-red/README.md b/node-red/README.md index 2dbff52..bd50f2d 100644 --- a/node-red/README.md +++ b/node-red/README.md @@ -1,7 +1,7 @@ node-red ======== -![](https://badge.imagelayers.io/vimagick/node-red:latest.svg) + [Node-RED][1] is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. @@ -9,9 +9,10 @@ services in new and interesting ways. ![](screenshot.png) ## directory tree +> The `data` directory will be created after first running. ``` -~/fig/node-red/ +~./node-red/ ├── docker-compose.yml └── data/ ├── flows_cred.json @@ -20,8 +21,8 @@ services in new and interesting ways. │ └── flows └── settings.js ``` - -> The `node-red` directory will be created after first running. +> The `arm` directory is only needed for ARM deployments, delete it if +> you are not using `arm`. ## docker-compose.yml @@ -35,30 +36,10 @@ node-red: restart: always ``` -## settings.js +## set-up -```javascript -module.exports = { - - adminAuth: { - type: "credentials", - users: [{ - username: "admin", - password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.", - permissions: "*" - }], - default: { - permissions: "read" - } - }, - -} -``` - -> Password hash can be generated by running `node-red-admin hash-pw` -> - -## up and running +Copy only the `docker-compose.yml` to your desired installation folder. +And follow these steps: ```bash $ docker-compose up -d @@ -67,7 +48,8 @@ $ docker-compose exec node-red node-red-admin hash-pw >>> Password: ****** ... $2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN. -$ vi data/settings.js +# Uncomment the adminAuth section and add your hashed password +$ sudo vi data/settings.js $ docker-compose exec node-red bash >>> cd /data @@ -82,3 +64,26 @@ $ docker-compose restart > Install nodes from [node-red-nodes](https://github.com/node-red/node-red-nodes). [1]: http://nodered.org/ + +## settings.js + +```javascript +module.exports = { +... + adminAuth: { + type: "credentials", + users: [{ + username: "admin", + password: "ADD_HERE_YOUR_HASH_PASSWORD", + permissions: "*" + }], + default: { + permissions: "read" + } + }, +... +} +``` + +> Password hash can be generated by running `node-red-admin hash-pw` +>