Skip to content

Commit

Permalink
Removed disable again, updated STATIC_DIRS
Browse files Browse the repository at this point in the history
  • Loading branch information
gtalarico committed Aug 10, 2018
1 parent 68b3321 commit b8dfca7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ $ heroku git:remote --app django-vue-template-demo
$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku config:set YARN_PRODUCTION=true
$ heroku config:set DJANGO_SETTINGS_MODULE=project.settings.prod
$ heroku config:set DISABLE_COLLECTSTATIC=1
$ git push heroku
```
Expand Down
4 changes: 0 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
"DJANGO_SETTINGS_MODULE": {
"description": "Set Django Settings to Production",
"value": "project.settings.prod"
},
"DISABLE_COLLECTSTATIC": {
"description": "Do not collect",
"value": "1"
}
},
"engines": {
Expand Down
9 changes: 5 additions & 4 deletions project/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
# http://whitenoise.evans.io/en/stable/django.html?highlight=django

STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'dist', 'static'),
]
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_ROOT = os.path.join(BASE_DIR, 'dist', 'static')
# No Need to Collect, serve dist as is
# STATICFILES_DIRS = [
# os.path.join(BASE_DIR, 'dist', 'static'),
# ]
1 change: 0 additions & 1 deletion project/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
# Set to your Domain
ALLOWED_HOSTS = ['django-vue-template-demo.herokuapp.com']


##########
# STATIC #
##########
Expand Down
5 changes: 0 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
# Collect Static is Done Manually
# because Heroku runs `collectstatic`` before `yarn build`
# so dist is not ready
echo "Collecting Static..."
python manage.py collectstatic --noinput
echo "Migrate..."
python manage.py migrate

0 comments on commit b8dfca7

Please sign in to comment.