Question

How to define worker run command on Procfile?

I am running a Django application on the App Platform which features a main web service. Additionally, I want a separate process to run some scheduled tasks with Django-Q2.

I have managed to get everything running by attaching a worker server to my web service, and then manually typing my desired run command in the control panel UI.

However, I have two questions:

  1. Is there any way to run these two in the same main web service, in different processes? I know this isn’t scalable, but I’m in the development stage and I don’t see the point in spending an extra $12 for the worker

  2. Is there any way to declare this in the Procfile?

My Procfile is as follows:

web: python manage.py migrate && gunicorn --worker-tmp-dir /dev/shm config.wsgi:application worker: python manage.py schedule_tasks && python manage.py qcluster

Web runs OK, but worker doesn’t.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel