Multiple node-red instances sharing data directory

I have several node-red instances that all share the exact same flows. The flows are written in such a way that every difference uses environment variables pushed in using docker. For example, they each subscribe to unique MQTT topics, but the topics use an environment variable in the flow to accomplish this using the same configuration.

It would be great to bind-mount a single /data folder into all the instances, so that I don't have to copy over all the flows to push updates. But there are some things that need to stay unique, like the /context folder, for instance, as it stores some unique variables.

The desired result is to make changes to only one instance, and have those changes propagate to the other nodes. We have tried copying flows.json, and that works but does not bring with it dashboard layouts, which we edit frequently, so all those changes still need to be copied manually.

some methods I'm considering:

while inotifywait -r -e modify,create,delete,move /directory; do
    rsync -avz /directory /target


Does anyone have experience with this type of setup they could share?

Someone has already answered this particular question in this very community. You should try searching. Best wishes.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.