Execute services in Procfile

I have the following Procfile: web: python manage.py migrate && python manage.py collectstatic --noinput && gunicorn core.wsgi worker: celery -A core worker --loglevel=INFO beat: celery -A core beat -l INFO But when I push to GitHub, only web is launched. How do I get the woker and beat to run as well. Preferably automatically as well as the web, I have already tried using the command: railway run worker, but I got the following error: exec: "worker": executable file not found in $PATH I've also tried starting all tasks in a single service: web: python manage.py migrate && python manage.py collectstatic --noinput && celery -A core worker --loglevel=INFO && celery -A core beat -l INFO && gunicorn core.wsgi But in this case, only the worker started the beat and not the web.
5 Replies
Percy
Percy2y ago
Project ID: 3ba430a8-05c7-4204-a9f8-68e3384f9370
Percy
Percy2y ago
In order to execute services in a Procfile, you need to create a separate service for each process and set a start command for each service.
⚠️ experimental feature
caiosampaio
caiosampaioOP2y ago
3ba430a8-05c7-4204-a9f8-68e3384f9370
jackson
jackson2y ago
web: python manage.py migrate && python manage.py collectstatic --noinput && celery -A core worker --loglevel=INFO & celery -A core beat -l INFO & gunicorn core.wsgi try that
caiosampaio
caiosampaioOP2y ago
Thank you very much, that's how beat and web ran. But I managed to make the worker run with just this tweak: web: python manage.py migrate && python manage.py collectstatic --noinput & celery -A core worker --loglevel=INFO & celery -A core beat -l INFO & gunicorn core.wsgi
Want results from more Discord servers?
Add your server