spants Posted August 26, 2014 Share Posted August 26, 2014 This is how I got my version of Node-Red running on docker on Unraid.. What is Node-Red? Please have a look at http://Nodered.org and http://www.techrepublic.com/article/node-red/ (spoiler, it is an amazing application to enable the Internet of Things. I use it to monitor sensors around my house and to send alerts to my phones using PushBullet). First of all, create a Dockerfile containing: # Dockerfile for Node-RED - pulls latest master code from git #FROM ubuntu:12.04 FROM phusion/baseimage:0.9.11 # based on the original by @cpswan MAINTAINER ceejay # some changes by Spants # add universe repository to /etc/apt/sources.list # we need it later as rlwrap is required by node.js #RUN sed -i s/main/'main universe'/ /etc/apt/sources.list # make sure everything is up to date - update and upgrade RUN apt-get update -y # RUN apt-get upgrade -y # install dependencies #RUN apt-get install python-software-properties python g++ make software-properties-common wget curl unzip git -y RUN apt-get install python-software-properties wget curl unzip git -y # add node.js repo RUN add-apt-repository ppa:chris-lea/node.js -y # another update so added repo can be used RUN apt-get update # install node.js RUN apt-get install nodejs -y --force-yes # download latest node-red RUN cd /opt && git clone https://github.com/node-red/node-red.git # remove some nodes RUN cd /opt/node-red/nodes/core && rm -rf hardware deprecated RUN cd /opt/node-red/nodes/core/io && rm -f 25-serial* # install node-red node_modules RUN cd /opt/node-red && npm install --production && npm install eyes js2xmlparser pushbullet fs.notify # add extra nodes project so we have the lot just in case. RUN cd /opt/node-red/nodes && git clone https://github.com/node-red/node-red-nodes.git # expose port EXPOSE 1880 # Set the default command to execute # when creating a new container CMD /usr/bin/node /opt/node-red/red.js -v /config/flow.json I changed the base image to match my use, added the /config and also added pushbullet Save this file to a directory on your unraid system Build the image/container: From this directory: docker build --tag="nodered” . (dont forget the trailing . !) and then: (/mnt/disk9/appdata/nodered is my data directory for node-red) docker run -d --name nodered -p 1880:1880 -v /etc/localtime:/etc/localtime:ro -v /mnt/disk9/appdata/nodered:/config:rw nodered Then check if it is running with http://192.168.1.22:1880 (change the IP to suit!) I don't know how to make a template, sorry. ** Just one gotcha, you will get an error if you change a flow and deploy. If you delete the flow from the disk then deploy it will work ok. I don't know why yet. ** Tony ** edit added --force-yes to nodejs install line ** Quote Link to comment
threldor Posted August 26, 2014 Share Posted August 26, 2014 now we just need a mosquitto in a docker container to add MQTT to the mix Quote Link to comment
jonp Posted August 26, 2014 Share Posted August 26, 2014 This is how I got my version of Node-Red running on docker on Unraid.. What is Node-Red? Please have a look at http://Nodered.org and http://www.techrepublic.com/article/node-red/ (spoiler, it is an amazing application to enable the Internet of Things. I use it to monitor sensors around my house and to send alerts to my phones using PushBullet). First of all, create a Dockerfile containing: # Dockerfile for Node-RED - pulls latest master code from git #FROM ubuntu:12.04 FROM phusion/baseimage:0.9.11 # based on the original by @cpswan MAINTAINER ceejay # some changes by Spants # add universe repository to /etc/apt/sources.list # we need it later as rlwrap is required by node.js #RUN sed -i s/main/'main universe'/ /etc/apt/sources.list # make sure everything is up to date - update and upgrade RUN apt-get update -y # RUN apt-get upgrade -y # install dependencies #RUN apt-get install python-software-properties python g++ make software-properties-common wget curl unzip git -y RUN apt-get install python-software-properties wget curl unzip git -y # add node.js repo RUN add-apt-repository ppa:chris-lea/node.js -y # another update so added repo can be used RUN apt-get update # install node.js RUN apt-get install nodejs -y # download latest node-red RUN cd /opt && git clone https://github.com/node-red/node-red.git # remove some nodes RUN cd /opt/node-red/nodes/core && rm -rf hardware deprecated RUN cd /opt/node-red/nodes/core/io && rm -f 25-serial* # install node-red node_modules RUN cd /opt/node-red && npm install --production && npm install eyes js2xmlparser pushbullet fs.notify # add extra nodes project so we have the lot just in case. RUN cd /opt/node-red/nodes && git clone https://github.com/node-red/node-red-nodes.git # expose port EXPOSE 1880 # Set the default command to execute # when creating a new container CMD /usr/bin/node /opt/node-red/red.js -v /config/flow.json I changed the base image to match my use, added the /config and also added pushbullet Save this file to a directory on your unraid system Build the image/container: From this directory: docker build --tag="nodered” . (dont forget the trailing . !) and then: (/mnt/disk9/appdata/nodered is my data directory for node-red) docker run -d --name nodered -p 1880:1880 -v /etc/localtime:/etc/localtime:ro -v /mnt/disk9/appdata/nodered:/config:rw nodered Then check if it is running with http://192.168.1.22:1880 (change the IP to suit!) I don't know how to make a template, sorry. ** Just one gotcha, you will get an error if you change a flow and deploy. If you delete the flow from the disk then deploy it will work ok. I don't know why yet. ** Tony AWESOME! I gotta try this!! Quote Link to comment
tokra Posted April 10, 2018 Share Posted April 10, 2018 You can add my repo to template repositories and add new container from tokra/nodered https://github.com/to-kra/unraid-docker-templates/tree/master/tokra Quote Link to comment
tokra Posted April 10, 2018 Share Posted April 10, 2018 Will add mosquitto mqtt docker tmrw. Quote Link to comment
spants Posted April 10, 2018 Author Share Posted April 10, 2018 Why would you create another nodered docker and mosquito docker? What was missing from mine? Quote Link to comment
tokra Posted April 14, 2018 Share Posted April 14, 2018 (edited) @spants These templates I created from official Nodered & Eclipse-Mosquitto docker hub repos. I think they are better maintained - thats the reason. Edited April 14, 2018 by tokra Quote Link to comment
spants Posted April 14, 2018 Author Share Posted April 14, 2018 My node red template is for the official docker.... I used to work with the guys that wrote node red!... The mqtt one needed work to support passwords - these are imported and encrypted when the docker starts. Quote Link to comment
ICDeadPpl Posted April 17, 2018 Share Posted April 17, 2018 I wonder if there's a way to make the feedparser node have a "state" of sorts? Because every time the docker image is updated, the feedparser flow is executed and it sends old posts again to my email. Is there a way to prevent the feedparser node from sending duplicates? As of now, I'm back to using IFTTT to get RSS feed updates. Quote Link to comment
spants Posted April 17, 2018 Author Share Posted April 17, 2018 5 hours ago, ICDeadPpl said: I wonder if there's a way to make the feedparser node have a "state" of sorts? Because every time the docker image is updated, the feedparser flow is executed and it sends old posts again to my email. Is there a way to prevent the feedparser node from sending duplicates? As of now, I'm back to using IFTTT to get RSS feed updates. The best way is to find the author of the node on flows.Nodered.org and raise an issue on github/slack/Google groups Tony Quote Link to comment
ebnerjoh Posted February 21, 2019 Share Posted February 21, 2019 Hi, I am wondering how I could manually install plugins? Br, Johannes Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.