I have several processes in my Django app, namely:
web
celery queue A
celery queue B
celery beat
celery flower
I want to configure such that the web, celery queue A, and celery queue B has minimum of 2 machines each, but EXACTLY one for celery beat and celery flower processes.
From there, use fly scale count to control the number of machines per process. We have some docs that break down in greater detail how to run multiple process groups in an app: Run Multiple Process Groups in an App · Fly Docs
Just to clarify, so the number of scale is not possible to be defined in fly.toml? I kinda want to define number of scale for each process/machine in the fly.toml. So, when I run fly deploy, it will always follow the last settings on scale?
You can always set a make deploy shortcut that would enable you do to so.
Example, create a Makefile in the root of your project, and inside you’d have:
Then just run make deploy.
You could even make it more dynamic, scripting something to get the number of machines from a fly_scale.json or even from some field that you place inside the fly.toml file.