Bradley Kirton's Blog

Published on Feb. 13, 2024

Go home

How to run celery and celery beat in dokku django app

Running celery and celery beat within a django application in dokku is straight forward but requires scaling up the number of processes.

Suppose you have the following Procfile.

web: gunicorn project.config.wsgi --worker-class gthread --workers 4
worker: celery -A project.config worker -l INFO
beat: celery -A project.config beat 

By default dokku will run a single process for the web command. To run celery and celery beat you can scale up the number of processes as follows.

dokku ps:scale sites beat=1 worker=1

Scaling apps in dokku