/djheroku

Example deployment app for heroku with django and celery

Primary LanguagePython

DJHeroku

The example project for the deployment of Django + Celery on the Heroku hosting. For the article found here: https://garmoncheg.blogspot.com/2019/02/running-tasks-with-celery-on-heroku.html

The Stack

  1. Web Framework - Python 3/Django https://docs.djangoproject.com
  2. Celery https://celery.readthedocs.io/en/latest/index.html

Install (OSX-specific)

In a terminal window:

  1. git clone https://github.com/garmoncheg/djheroku

  2. cd djheroku

  3. mkvirtualenv --python=`which python3` djheroku (Install virtualenvwrapper if you don't have it https://virtualenvwrapper.readthedocs.io/en/latest/)

  4. workon djheroku

  5. pip install -r requirements.txt

  6. python manage.py migrate

Running celery for debug

$ celery worker --loglevel=info --beat

Running Django server:

$ ./manage.py runserver 0.0.0.0:8000