From 34de722ad0e816cc7f0effd4d25234fc60468b0e Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 4 Dec 2015 19:13:13 +0800 Subject: [PATCH] update --- nodered/README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/nodered/README.md b/nodered/README.md index b5bb894..5865dd7 100644 --- a/nodered/README.md +++ b/nodered/README.md @@ -6,4 +6,65 @@ nodered [Node-RED][1] is a tool for wiring together hardware devices, APIs and online services in new and interesting ways. +## directory tree + +``` +~/fig/nodered/ +├── docker-compose.yml +└── node-red/ + ├── flows_cred.json + ├── flows.json + ├── lib/ + │ └── flows + └── settings.js +``` + +> The `node-red` directory will be created after first running. + +## docker-compose.yml + +``` +nodered: + image: vimagick/nodered + ports: + - "1880:1880" + volumes: + - ./node-red:/root/.node-red + restart: always +``` + +## settings.js + +``` +module.exports = { + + //... + + flowFile: 'flows.json', + + //... + + adminAuth: { + type: "credentials", + users: [{ + username: "admin", + password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.", + permissions: "*" + }] + }, + + //... + +} +``` + +## up and running + +``` +$ cd ~/fig/nodered/ +$ docker-compose up -d +$ vi node-red/settings.js +$ docker-compose restart +``` + [1]: http://nodered.org/