Multiple docker instances - best way to specify specific settings.js

I run a few instances of Node-red using docker containers. I'd like to have differently named settings files for each instance. Anyone suggest the best way of doing this?

(I'm using docker under Unraid if it's relevant)

Hah ok I've solved it. I set the $FLOWS env varianble to --settings=/data/xxxsettings.js
Is this a reasonable solution? or am I perverting things? I guess this is a node-red docker 'thing'

1 Like

It would probably be better/cleaner to have separate volumes mounted on /data for each instance then they can't clash with each other.

+1 this option is cleaner

er I do have separate volumes, there are no clashes. This was about making it a bit easier to manage editing the config files. Was a small ergonomic point

If there volumes are suitably named, then why bother naming the settings.js file as well ..

Just in case it is in a small way interesting I will fully describe my use case. I have the following node-red environments -:

  1. /nodered - Production
  2. /nodered2 - Testing of docker vs standalone facets (probably should be deleted)
  3. /nodered3 - Beta Testing
  4. /nodered4 - Development
  5. /nodered5 - Completely clean environment (probably should be deleted)

So indeed my volumes are poorly named.
I am a bit of a chaotic undisciplined developer and I like to have backups and reverts easily available I am also ancient and although I am becoming more git literate, I still don't really trust myself to rely on it.

So I regularly download flows to files called DevFlows, BetaFlows etc. I like to have a directory with all the downloaded flows and the corresponding settings files (nicely named) to facilitate a recovery/revert

Hope my topic wasn't 'clickbait' to you and I hope I haven't wasted your time. Thanks for thinking about it

With this volumes structure mapped to your different environments, I still do not see why you need to "download" the files of each. As long as each container has its own /data folder, you don't need to rename settings.js file to have a specific setting on each NR env.

To back-up / revert to previous versions, if you're not into gitOps, you could cron a back-up of the meaningful files/folders into a different host, and you should be good.

Many thanks