Skip to content

Deployment

Olivier Vadiavaloo edited this page Nov 20, 2021 · 5 revisions

Social-Distribution is currently deployed at https://social-distribution-fall2021.herokuapp.com/app/

How to deploy?

  • The deploying branch is deploy

  • Make sure that all tests pass before pushing to this branch and that the project is in a deployable state.
    Automatic deploys are currently enabled.

  • Make sure to have gunicorn and django-on-heroku installed.

  • The Procfile should be placed in root directory and should contain the following:

    web: gunicorn --chdir ./code cmput404.wsgi

    • The --chdir ./code is needed because the cmput404 project folder is inside the code/ directory.
  • Add import django_on_heroku at the top of code/cmput404/settings.py.

  • Add django_on_heroku.settings(locals()) at the bottom of code/cmput404/settings.py.

  • Make sure the .env file is inside the code/ directory.

  • Add, commit and push changes to the deploy branch. It should automatically deploy.
    You can check the logs using heroku logs --tail if you have Heroku CLI installed.

  • Apply migrations using:

    heroku run --app social-distribution-fall2021 python code/manage.py migrate

Clone this wiki locally