Run workflows as docker app


I need to build docker apps from set of workflows and add them into container which incldes set of Apps (n8n workflows).
is this doable and supported from n8n.

I appricate your reply .

Best Reagrds

Hi @hasanm, I think you technically can create a Dockerfile installing n8n, then calling the n8n CLI in your Dockerfile to import and start your workflows.

I have not done this before though, so I don’t have any template or experience to share I am afraid.

Hey @hasanm,

I am curious to understand a bit more about this, Why are you trying to do this, What is the end goal?

Hi Jon,

My first post in n8n at this link Is this workflow doable in n8n?
and as you see in diagram i have to many services to automate by n8n .

The end goal is built microservices automation system.

Indeed i have also two questions :slight_smile:
1- I have primary and secondary API servers for service and if main server is down how workflow will be authenticated against secondary server ?

2- is it applicable to use node authentication as variable ? ( same workflow will trigger by different servers and different authentication )

Best Regards

Hey @hasanm,

That diagram looks more like a workflow structure than a deployment thing. So workflows need an n8n instance to run from but if you wanted to have standalone instances that just runs one or 2 workflows you would need to do multiple installs then import your workflows and update any credentials as needed then think of a way to trigger the workflows so it could be that you use http requests and webhook nodes on each instance or maybe write them to a database and have each instance check the database for jobs it needs to run.

To answer the new questions…

  1. You would need to build your workflow to check the API response so something like always output data and continue on error would be key, From there you would use an If node so if you got a response carry on else try server 2.

  2. Currently expressions / variables can’t be used for authentication so you would need to either make a generic credential or make sure the node is set to use the correct credential. Dynamic credentials is something we will be working on at some point as it will make life easier for anyone using n8n as a backend.

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