[Django]-How to deploy Django with Channels and Celery on Heroku?

5👍

You can have as many entries in the Procfile as you like. The only one that is special is “web”, because that’s the one Heroku expects to receive web requests, and the only one it will start automatically for you. You can use your own names for the rest:

web: gunicorn project.wsgi:application
celeryworker: celery worker --app=project.taskapp --loglevel=info
channelsworker: python manage.py runworker -v2

Now you can do heroku ps:scale celeryworker=1 and heroku ps:scale channelsworker=1 to start the other two processes.

See the Heroku Procfile docs for more information.

Leave a comment