node-red-app/readme.md

1.3 KiB

Node Red App Generator - Docker Based

This repo with docker and docker compose will spin up a node/node-red container for a single node red application.

  1. clone repo
  2. create .cfg file from example in /apps folder
  3. run ./make-env-file <name of your cfg file> to make corresponding .env file
  4. now you can run ./start
  5. use ./logs to attach to container for viewing logs

example.cfg

#!/bin/bash
# Custom container name,  default is <cfg filename>-nodered-app
# Name=containername
# Custom user, default is current user (must be in docker group)
# USER=jim  # not needed if current host user is 1000
# TZ=America/Los_Angles # default
# settings will be put in <parentfolder>/node-red-app/<cfg filename>
Parent_Folder=/data
# "extra-host" set broker and home assistant ips on host inside container
Broker=broker.mynetwork.net # will lookup ip using dig
HomeAssistant=ha.kebler.net # will look up ip using dig
# give a custom tag.  https://hub.docker.com/r/nodered/node-red/tags
# Tag=latest-18  # this is tje default  
Port=1881 # MUST be changed to avoid conflict with other node red app containers

Then set up a reverse proxy if you want to the port you set

TODO - Make DockerFile that will load in an existing settings folder for a self contained deployment of an app.