Allow to specify filename of flows_cred.json, like flowFile in settings.js

This would allow, like the flowFile, to put it in a subdirectory.

This way flows.json and the corresponding flows_cred.json file can be in their own git repository (when not using the git integration of node-RED).

This way I can bind mount these files in a docker container and not have them in the ( also bind mounted) /data directory.

Ultimate purpose is a system to allow developers to have a repository

  • dockerfile for building the image with preinstalled nodes
  • a specific instance of a docker container with developer docker-compose file
  • a docker-compose file for server deployment with possibility to revert to a specific tagged version of flows.json.

I'd like to have all this in the same repo, as they belong together, but I don't like to see the entire contents of to repo in the projects directory of node-red.

Interesting idea. Certainly the use of the userDir folder has greatly expanded over the years so perhaps it might be time to think about the management of the core files and see if there are some improvements that could be made?

If you start node red and pass in a flow name eg node-red foo.json then it automatically creates foo_cred.json for you... Is this not the case if you set the name in settings.js ?

It always generates the credentials filename based on the flow file name. However it does not take the directory into account - the credentials file always ends up in ~/.node-red regardless of where the flow file is.

I must admit that surprised me - I thought it always co-located the files.

So yes, there is something to think about here.

1 Like

oooo - that sort of feel like a bug... but then again I can see why we wouldn't want to just stick creds files inside projects to get uploaded to github for everyone to look at ! That would be even worse.

You could also want to specify a cred file for managing it outside a container running nodered (for prepping rapid deployment e.g.)

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