Where can I store subflow nodes with Broker / DB configuration except for `/data/flows.json` so that they show up in the Pallete?

I am packing some pre-configured nodes within subflows and currently building a container image where these subflows are stored in /data/flows.json file. This works great for a fresh spun up container an I am able to see my custom nodes in the pallete.

I have to resort to this method because AFAIK current node-RED subflow implementation does not support configuration of brokers / databases within them if I decide to package them according to the documentation.

My personal research on the forum also backs me up:

Problem

since flows.json is a standard file and there is a higher chance that it pre-exists within a host machine in a volume and may overwrite my subflow nodes hence losing my nodes within the container

Solution / Workaround

I tried a possible solution of copying the flow.json (which has the subflow nodes) to /data/lib/flows.json which will NOT display them in the pallete (but will be accessible via the file-system search menu)

Repo

My Repository where I tried a lot of things with subflow nodes GitHub - shantanoo-desai/node-red-subflows-mqtt: Create Custom Nodes in node-red using subflows for MQTT Broker
for reproduction purposes

Query

Is there some other file within the /data directory where I can pack these subflow nodes and they will be available to me in the pallete without having to worry about being written by existing flows.json file from some volumes that can be mounted to the container?

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