[SOLVED] How to import and deploy a flow from a bash script?

I have a docker image with node-red running. I would like to know if (and how) it is possible to import a flow saved in a text file then to deploy it. My goal is to give a docker ready to deploy with a flow automaticaly imported and deployed (using bash script) when they start their own container

If you are trying to "import" a complete flow file then you don't need to import that. All you need to do is to transfer it to the correct folder and either rename it or - probably better - change the startup to use a generic flow file name.

The flow file is simply a JSON text file.

Hi TotallyInformation
thanks for your answer. Yes I want to use a complete flow. I'ill try to do what you propose.

To conclud,
I saw in settings.js it is possible to set a flowFile however for some reason, I can' t make it work (I don' t know what I did wrong). Anyway I solve the problem by just adding the json file when I start node-red.
that way when I pop a docker, the flow is automatically deployed.

thx again TotallyInformation

1 Like