trying to run Node RED in Docker via Docker Compose yaml file. I need to load with HTTPS enabled and path to certificate files.
This is example of Docker Compose file.
But it does not work.
Does Node RED support evirnoment variables to set up HTTPS? Or do you know any other method without copying settings file outside container? (maybee problems with Node RED updates with static settings file)
i read the documentation for Node-red Docker and didnt see any enviroment variables for certs
like you tried to do in your Docker compose file.
After testing this what worked for me is to create a folder where your yaml file is
and map it to the container to
/data which is the internal folder the NR container uses for the flows, settings.js file etc
node-red-data copy your cert files and then edit your
settings.js section to enable https
/** Option 1: static object */
spin up your docker-compose and visit
Docker version of the Node-RED copying the settings.js file to persistent storage out of the container. If I will make some changes and in the future, there will be a new version of Node-RED with new functions which require new sections in the settings.js file, there will be a problem I guess because after pulling the new version of the Node-RED, settings.js file will not be overwritten. This is the reason why I want to set up HTTPS via ENV or add the HTTPS configuration to the end of the configuration file whenever the container starts.
That should not be the case. Even a standard Node-RED install initialises a default settings.js if one does not exist but it will not overwrite one that does. Which is why you should review changes to the settings file when you update Node-RED.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.