Use Heroku's Release Phase for Migrations (#1615)

Automatically run migrations on deployments to Heroku. Advantages include deployments are rolled-back if a migration fails, preventing broken applications due to failed migrations, no time between when application is released and database is migrated, and removes risk of forgetting to manually run migrations.
This commit is contained in:
Marlon 2018-05-05 09:28:30 +00:00 committed by Nikita Shupeyko
parent b4d0416530
commit ec78d9ce97

View File

@ -1,3 +1,4 @@
release: ./manage.py migrate
web: gunicorn config.wsgi:application
{% if cookiecutter.use_celery == "y" -%}
worker: celery worker --app={{cookiecutter.project_slug}}.taskapp --loglevel=info