-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove post_compile call from Procfile and update it to run bower
- Loading branch information
Showing
3 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
release: bin/post_compile | ||
web: gunicorn backend.wsgi --log-file - | ||
web: gunicorn backend.wsgi --log-file - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
{ | ||
"name": "DjangoBoilerplate", | ||
"addons": [ | ||
{ | ||
"plan": "heroku-postgresql:hobby-dev", | ||
"options": { | ||
"version": "13" | ||
}, | ||
"as": "DATABASE" | ||
} | ||
], | ||
"env": { | ||
"DJANGO_DEBUG": "1", | ||
"ALLOWED_HOSTS": { | ||
"description": "Django ALLOWED_HOSTS setting, e.g.: .appname.herokuapp.com" | ||
}, | ||
"DJANGO_SECRET_KEY": { | ||
"generator": "secret" | ||
}, | ||
"DJANGO_SETTINGS_MODULE": { | ||
"description": "Django settings Python import path", | ||
"value": "settings.production" | ||
}, | ||
"DISABLE_COLLECTSTATIC": { | ||
"description": "Disables django collectstatic", | ||
"value": "1" | ||
}, | ||
"ENABLE_DJANGO_COLLECTSTATIC": { | ||
"description": "Enables collectstatic to be run by post_compile", | ||
"value": "1" | ||
}, | ||
"AUTO_MIGRATION": { | ||
"description": "Setting to run migrate automatically by post_compile", | ||
"value": "1" | ||
} | ||
}, | ||
"buildpacks": [ | ||
{"url": "heroku/nodejs"}, | ||
{"url": "heroku/python"} | ||
{ | ||
"url": "heroku/nodejs" | ||
}, | ||
{ | ||
"url": "heroku/python" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
# !/usr/bin/env bash | ||
echo "=> Performing database migrations..." | ||
python manage.py migrate | ||
echo "====> Running post-compile hook..." | ||
|
||
if [ -n "$ENABLE_DJANGO_COLLECTSTATIC" ] && [ "$ENABLE_DJANGO_COLLECTSTATIC" == 1 ]; then | ||
echo "=====> Running bower install" | ||
./node_modules/.bin/bower install | ||
|
||
echo "=====> Running collectstatic" | ||
python manage.py collectstatic --noinput | ||
fi | ||
|
||
echo "=====> Running manage.py check --deploy --fail-level WARNING" | ||
python manage.py check --deploy --fail-level WARNING | ||
|
||
if [ -n "$AUTO_MIGRATION" ] && [ "$AUTO_MIGRATION" == 1 ]; then | ||
echo "=====> Running manage.py migrate" | ||
python manage.py migrate --noinput | ||
fi |