Thanks @waltervl !
That is the right image for me!
I played a lot with docker last days, and with the below yml file (and a nodered dockerfile) i have my first setup working (a bit).
I started with a setup with IOTstack that helps you with some files and commands...
Already have these applications working
- domoticz (with hue, broadlink, zwave and rfxcom and dzvents scripts, and databaseoutside the container)
- mqtt (with nodered and domoticz, must still test this)
- nodered, with flows outside of the container
For those who want to have a first startup, see my yml below
For others, if you can check my yml file, i think there are still a number of entries that arent needed.
Part i did some guessing was the network part, dont now if this is the right setup for letting these 3 applications talk together
Code: Select all
version: '3.6'
services:
domoticz:
container_name: domoticz
image: domoticz/domoticz:latest
ports:
- "82:8080"
- "6144:6144"
- "1443:1443"
- "9000:9000"
devices:
- '/dev/ttyUSB0:/dev/ttyUSB0'
- /dev/ttyACM0:/dev/ttyACM0
volumes:
- ./volumes/domoticz/data:/opt/domoticz/userdata
restart: unless-stopped
network_mode: bridge
environment:
- PUID=1000
- PGID=1000
#- LOG_PATH=/opt/domoticz/userdata/domoticz.log
mosquitto:
container_name: mosquitto
image: eclipse-mosquitto
restart: unless-stopped
user: "1000"
ports:
- "1883:1883"
volumes:
- ./volumes/mosquitto/data:/mosquitto/data
- ./volumes/mosquitto/log:/mosquitto/log
- ./volumes/mosquitto/pwfile:/mosquitto/pwfile
- ./services/mosquitto:/mosquitto/config:ro
network_mode: bridge
nodered:
container_name: nodered
build: ./services/nodered/.
restart: unless-stopped
user: "0"
privileged: true
environment:
- TZ=Etc/UTC
ports:
- "1880:1880"
volumes:
- "./volumes/nodered/data:/data"
- "/var/run/docker.sock:/var/run/docker.sock"
- "/var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket"
devices:
- "/dev/gpiomem:/dev/gpiomem"
- "/dev/ttyAMA0:/dev/ttyAMA0"
- "/dev/vcio:/dev/vcio"
networks:
- iotstack_nw
logging:
options:
max-size: 5m
max-file: "3"
networks:
iotstack_nw:
name: IOTstack_Net
# external: true
driver: bridge
ipam:
driver: default
config:
- subnet: 10.77.60.0/24
and my dockerfile for nodered (to add some extra nodes)
Code: Select all
FROM nodered/node-red:latest-12
USER root
RUN apk update && apk add --no-cache eudev-dev
USER node-red
RUN cd /usr/src/node-red && npm install --save node-red-configurable-ping node-red-dashboard node-red-node-random node-red-node-email