1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-12 11:14:57 +02:00
dockerfiles/nodered/README.md

74 lines
1.2 KiB
Markdown
Raw Normal View History

2015-12-04 11:49:45 +02:00
nodered
=======
![](https://badge.imagelayers.io/vimagick/nodered:latest.svg)
[Node-RED][1] is a tool for wiring together hardware devices, APIs and online
services in new and interesting ways.
2015-12-04 13:13:13 +02:00
## 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: "*"
}]
},
//...
}
```
2015-12-04 13:23:58 +02:00
> Password hash can be generated by:
>> `node -e "console.log(require('bcryptjs').hashSync('password', 8))"`
2015-12-04 13:13:13 +02:00
## up and running
```
$ cd ~/fig/nodered/
$ docker-compose up -d
$ vi node-red/settings.js
$ docker-compose restart
```
2015-12-04 11:49:45 +02:00
[1]: http://nodered.org/