Skip to content

Commit

Permalink
Update README [skip travis]
Browse files Browse the repository at this point in the history
point to gpoiod project, add compose example
  • Loading branch information
Dave Conway-Jones committed Oct 9, 2019
1 parent c6ea20e commit bd355ae
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ Disadvantages of the native GPIO support are:
3. Replace all native gpio nodes with `pi gpiod` nodes.
4. Configure `pi gpiod` nodes to connect to `PiGPIOd daemon`. Often the host machine will have an IP 172.17.0.1 port 8888 - but not always. You can use `docker exec -it mynodered ip route show default | awk '/default/ {print $3}'` to check.

For detailed install instruction please refer to the `node-red-node-pi-gpiod` [README](https://github.com/node-red/node-red-nodes/tree/master/hardware/pigpiod#node-red-node-pi-gpiod)
For detailed install instruction please refer to the `node-red-node-pi-gpiod` [README](https://github.com/node-red/node-red-nodes/tree/master/hardware/pigpiod#node-red-node-pi-gpiod)

If you want to run gpiod in a container rather than on the host, then [this project](https://github.com/corbosman/node-red-gpiod) may help.


## Managing User Data
Expand Down Expand Up @@ -274,10 +276,7 @@ services:
networks:
- node-red-net
volumes:
- node-red-data
volumes:
node-red-data:
- ~/node-red/data:/data
networks:
node-red-net:
Expand All @@ -289,7 +288,7 @@ The above compose file:
- sets the timezone to Europe/Amsterdam
- Maps the container port 1880 to the the host port 1880
- creates a node-red-net network and attaches the container to this network
- persists the `/data` dir inside the container to the `/mnt/docker-cluster/node-red/data` dir outside the container
- persists the `/data` dir inside the container to the users local `node-red/data` directory. The `node-red/data` directory must exist prior to starting the container.

## Project Layout
This repository contains Dockerfiles to build the Node-RED Docker images listed above.
Expand Down Expand Up @@ -431,6 +430,28 @@ Then a simple flow like below should work - using the alias *broker* we just set
This way the internal broker is not exposed outside of the docker host - of course
you may add `-p 1883:1883` etc to the broker run command if you want to see it...

### Docker-Compose linking example

Another way to link containers is by using docker-compose. The following docker-compose.yml
file creates a Node-RED instance, and a local MQTT broker instance. In the Node-RED flow the broker can be addressed simply as `broker` at its default port `1883`.

```
version: "3.7"
services:
node-red:
image: nodered/node-red
restart: unless-stopped
volumes:
- /home/pi/.node-red:/data
ports:
- 1880:1880
broker:
image: eclipse-mosquitto
restart: unless-stopped
```


## Common Issues and Hints

Expand Down

0 comments on commit bd355ae

Please sign in to comment.