August 26, 201411 yr 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 **
August 26, 201411 yr 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!!
April 10, 20188 yr 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
April 10, 20188 yr Author Why would you create another nodered docker and mosquito docker? What was missing from mine?
April 14, 20188 yr @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, 20188 yr by tokra
April 14, 20188 yr Author 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.
April 17, 20188 yr 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.
April 17, 20188 yr Author 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
Archived
This topic is now archived and is closed to further replies.