| ARCH | IMAGE | SIZE |
|---|---|---|
Node-RED is a tool for wiring together hardware devices, APIs and online services in new and interesting ways.
~/fig/node-red/
āāā docker-compose.yml
āāā data/
āāā bin/
ā āāā go-chromecast
āāā flows_cred.json
āāā flows.json
āāā lib/
ā āāā flows
āāā settings.js
Note
The node-red/data directory will be created after first running.
services: node-red: image: easypi/node-red ports: - "1880:1880" volumes: - ./data:/data - /dev/input:/dev/input privileged: true restart: unless-stopped
module.exports = { adminAuth: { type: "credentials", users: [{ username: "admin", password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.", permissions: "*" }], tokens: function(token) { return new Promise(function(resolve) { if (token === "******") { resolve({ username: "admin", permissions: ["*"] }); } else { resolve(null); } }); }, default: { permissions: "read" } }, }
Tip
Password hash can be generated by running node-red admin hash-pw
https://nodered.org/docs/security
$ docker-compose up -d $ docker-compose exec node-red node-red admin hash-pw >>> Password: ****** ... $2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN. $ vim data/settings.js $ docker-compose exec node-red bash >>> cd /data >>> apk add -U build-base >>> npm install node-red-node-irc >>> npm install node-red-node-daemon >>> exit $ docker-compose restart $ curl -sSfH "Authorization: Bearer ******" http://localhost:1880/diagnostics
Tip
Install nodes from node-red-nodes.