cardinalitypuzzles / cardboard

Dashboard for managing puzzles and tracking status during a puzzle hunt
MIT License
31 stars 21 forks source link

Staticfiles fix #715

Closed kcaze closed 9 months ago

kcaze commented 9 months ago

It looks like there were 2 main issues with static files:

  1. The staticfiles configs we set were getting clobbered by django_heroku.settings(). Setting staticfiles=False means we're using our own settings.
  2. The staticfile config we did have wasn't correct. It was missing STATIC_ROOT and the backend storage config was also incorrect. See https://whitenoise.readthedocs.io/en/latest/django.html for details.

I also updated docker-entrypoint.sh to use the --no-input flag when running collectstatic.

rgossiaux commented 9 months ago

I think our settings are working ok and django_heroku isn't doing anything too nefarious to them; you can see what changes it makes here: https://github.com/heroku/django-heroku/blob/master/django_heroku/core.py We have a few redundant lines in this file but nothing in conflict.

With that said we should probably just rip out that module wholesale and inline everything. That's what the creator recommends; looks like it's been deprecated for a couple years: https://github.com/heroku/django-heroku/issues/56

akirabaruah commented 9 months ago

Now that we have the webpack fix in https://github.com/cardinalitypuzzles/cardboard/pull/716, we can prob close this PR and followup with a separate django-heroku cleanup one?