Closed willkg closed 6 years ago
We're using whitenoise to serve static assets. The whitenoise docs say it serves requests for STATIC_URL
using files from `STATIC_ROOT.
http://whitenoise.evans.io/en/stable/django.html#make-sure-staticfiles-is-configured-correctly
In Heroku land, STATIC_ROOT
ends up as /app/staticfiles/
and the files we're looking for are definitely there.
For example, this url kicks up an HTTP 404:
https://standupstage.herokuapp.com/static/js/modernizr.min.698102883867.js
But the file is definitely there:
~ $ ls /app/staticfiles/js/modernizr.min.698102883867.js
/app/staticfiles/js/modernizr.min.698102883867.js
The whitenoise setup isn't complicated, so I'm not sure what's going wrong.
Maybe during the deploy, the static files get generated after the app has started and whitenoise has already done a listing of the files. Why haven't we run into that before?
My current theory is that django-pipeline doesn't support Django 2.0 in some way. Feels like that project is not maintained. Feels like we should move on to something else.
@pmac wants to experiment with switching all static asset building to webpack. He said he'll get to it, but possibly not soon.
I think I may downgrade to Django 1.11 again.
Going to https://standupstage.herokuapp.com/ shows a sad page with no JS or CSS. The static asset requests are all returning HTTP 404. Something is amiss!
This issue covers figuring out what and fixing it.