Django Heroku -> Railway
I'm using django cookiecutter as base: https://github.com/cookiecutter/cookiecutter-django
I have a Procfile from heroku and thinking of switching over to Railway but not sure how to convert it. Railway docs say Procfile only supports one process.
example Procfile:
release: python manage.py migrate
web: gunicorn config.wsgi:application
worker: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app worker --loglevel=info
beat: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app beat --loglevel=info
GitHub
GitHub - cookiecutter/cookiecutter-django: Cookiecutter Django is a...
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. - GitHub - cookiecutter/cookiecutter-django: Cookiecutter Django is a framework for jumpstarting produc...
Solution:Jump to solution
you have 3 things you need to run, celery worker, celery beat, and migrations + django.
this means you will need 3 nearly identical railway services that reside within the same railway project.
these 3 services will have the same service variables and deploy from the same github repo, the only differences being each would have different start commands:
python manage.py migrate && gunicorn config.wsgi:application
celery -A config.celery_app worker --loglevel=info
...5 Replies
Project ID:
N/A
n/a
Solution
you have 3 things you need to run, celery worker, celery beat, and migrations + django.
this means you will need 3 nearly identical railway services that reside within the same railway project.
these 3 services will have the same service variables and deploy from the same github repo, the only differences being each would have different start commands:
python manage.py migrate && gunicorn config.wsgi:application
celery -A config.celery_app worker --loglevel=info
celery -A config.celery_app beat --loglevel=info
REMAP_SIGTERM=SIGQUIT
would be set as a service variable instead of in the start commandsoic
let me try, thanks!
no prob, let me know if you need any clarification on anything