Prefect settings and profiles using Docker containers

I want to run Prefect flows using Docker containers deployed on different VMs through Docker Swarm, my infrastructure consists of the following:

  • 1 container as Prefect Orion server
  • 2 containers as Prefect Agents, picking up jobs from various queues

Each of these containers has its own PREFECT_HOME where files are stored (i.e.,memo_store.toml, profiles.toml, storage/, etc.), but I may set up Docker volumes so that either:

  • each PREFECT_HOME points to a shared location where all files are seen by all containers (Orion or Agents alike)
  • each container has its own PREFECT_HOME in different locations, without sharing any file

I looked at the Settings docs, but it didn’t clarify the best practice in the case of Docker containers deployed on different nodes and if having a shared file system is considered best practice or not.
I think it is part of a more general question: are all Prefect components supposed to share the same settings and storage locations, or are there cases where this shouldn’t be like this? Thanks for your help.

For a distributed Orion deployment, the easiest would be to leverage the prefect-helm collection and deploy your containers to Kubernetes

We don’t have any Docker swarm recipes atm and none are planned, so this would be a good way to contribute if you would be interested and you could use Prefect Orion helm chart as a good starting point

Settings are configured client side, probably the easiest way is to set them via environment variables