mozilla / standup

web app that logs daily standup updates
https://www.standu.ps
BSD 3-Clause "New" or "Revised" License
64 stars 32 forks source link

after last round of dependency updates, static files are broken #445

Closed willkg closed 6 years ago

willkg commented 6 years ago

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.

willkg commented 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?

willkg commented 6 years ago

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.