mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Add automatic migrations to heroku deploys (#1951)
heroku now has a new feature for running tasks as part of deployment. Perfect for automatic migrations. https://devcenter.heroku.com/articles/release-phase#specifying-release-phase-tasks
This commit is contained in:
parent
6e72169ffe
commit
1c5c4e52c0
|
@ -47,7 +47,6 @@ Run these commands to deploy the project to Heroku:
|
||||||
|
|
||||||
git push heroku master
|
git push heroku master
|
||||||
|
|
||||||
heroku run python manage.py migrate
|
|
||||||
heroku run python manage.py createsuperuser
|
heroku run python manage.py createsuperuser
|
||||||
heroku run python manage.py collectstatic --no-input
|
heroku run python manage.py collectstatic --no-input
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
release: python manage.py migrate
|
||||||
web: gunicorn config.wsgi:application
|
web: gunicorn config.wsgi:application
|
||||||
{% if cookiecutter.use_celery == "y" -%}
|
{% if cookiecutter.use_celery == "y" -%}
|
||||||
worker: celery worker --app={{cookiecutter.project_slug}}.taskapp --loglevel=info
|
worker: celery worker --app={{cookiecutter.project_slug}}.taskapp --loglevel=info
|
||||||
|
|
Loading…
Reference in New Issue
Block a user