I would like to know if it is possible to update and deploy a node-RED "flow" just by modifying files.
Let me explain: If for example I have 10 machines with Node-RED, I would like to be able to update their flow and deploy it without having to go through the Node-RED GUI, but simply by modifying a file via SSH.
The idea would be to modify 1x the flow via the Node-RED GUI and then push the new flow + deploy it via SSH on the 10 other endpoints.
Flows are just stored as a file on disk - so you could certainly scp your flows (and credentials) files to all of the devices and then restart Node-RED on each of them to pickup the changes.
I saw that the flows are saved in the following file: "/root/.node-red/flows_.json"
I've taken the following steps:
Realization of a flow in Node-RED
Deploy the Flow
Copy the file "/root/.node-red/flows_.json" to a temporary directory
Delete the flow in Node-RED
Deploys the changes
Copy the ".json" file from the temporary folder to "./node-red".
After that, I don't see the old flow in Node-RED again. How can I make Node-RED read this file and display it to me again without using the Node-RED GUI and the "import" function, but just by copying this file ?
I looked, and it seems that the "flows_.json" file is the only file that is modified when I modify a flow and click on "Deploy".