Use Heroku's Release Phase for Migrations

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-04-19 19:25:51 +00:00 committed by GitHub
parent edae0854bf
commit 150988a706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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