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:
- Packaging a Subflow as a module, missing broker configuration
- My Hack around the solution : MQTT configuration nodes are not recognized when packaged in a subflow module - #2 by Shan
- My feature request/wishlist/suggestions for 3.0
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?