Getting real confused about the settings.js file, which locations it is in and where node-red expects to find it.
When I run node-red locally in docker, it uses /data/settings.js and works as expected.
When running in azure container instance, it reports to use /usr/src/node-red/node_modules/node-red/settings.js
I then tried back and forth to edit Dockerfile to copy settings.js to /usr/src/node-red/node_modules/node-red/settings.js as well as other possible locations like /usr/src/node-red/settings.js and /data/settings.js
Not getting any success until it just happened to work in azure. Now it says it's using /data/settings.js, identical to how it is locally.
Why am I getting these varied results about where settings.js is supposed to be? Why did the same container use different settings.js locally than remote in azure?
Hard to say without reviewing all operations and logs but what i can say is if you see src/node-red/node_modules/node-red/ in the path, your looking at the wrong thing.
Typically the settings.js file is either specified by command line or its in the -uuserDir. If you see /data/settings.js then that is fairly regular.
but the most reliable way to tell is to look in the log output of node-RED:
Thx, yeah that's where I finally figured out the difference. I'm using slightly customized setup of node-red docker (GitHub - node-red/node-red-docker: Repository for all things Node-RED and Docker related). While simple in theory, there's quite a lot of files, scripts and lines to make this work. Ie. Dockerfile, build image bat script, then a total of 4 shell scripts to run inside the container (entrypoint.sh, install_devtools.sh, known_hosts.sh, remove_native_gpio.sh). I'm able to figure out some of it but still some parts confusing.
For example I think it's the entrypoint.sh which sets the useDir:
But I haven't figured out what the variables are or where they come from. Then similar start script in package.json. Feels like whenever I look for something, I find it partially in multiple places (better than not finding it at all haha).