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 node-red-data
and map it to the container to /data which is the internal folder the NR container uses for the flows, settings.js file etc
volumes:
- ./node-red-data:/data
In node-red-data copy your cert files and then edit your settings.js section to enable https
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.