cardinalitypuzzles / cardboard

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

Dev instance fails to load static resources with default config #768

Open jpd236 opened 10 months ago

jpd236 commented 10 months ago

I was trying to get a dev instance to start per the instructions at https://github.com/cardinalitypuzzles/cardboard/blob/main/dev-guide.md. I opted to run things manually rather than with Docker. For the most part, I think everything worked fine, but I did run into an issue with static resources failing to load correctly.

As far as I can tell, you need to either set DEBUG=true to enable the runserver command to serve resources on the fly, or else you need to run collectstatic to prepare the static files in advance before running the server. But .env.test doesn't set DEBUG, and there's no step to run collectstatic in the dev instructions.

It looks like the docker setup script runs collectstatic which covers it, but should .env.test go ahead and set DEBUG to true as well?

(For context, we on Ange Management are exploring other options for hunt dashboards for next year - may have a few more questions in the near future :))

jpd236 commented 10 months ago

I see that setting DEBUG shows up later in the instructions under "Local .env file: credentials, API Tokens, configuration", though this comes after the "Local deployment" step, and the link between DEBUG and the static file failure wasn't super clear to me.

rgossiaux commented 10 months ago

Thanks for the report! We should definitely fix this in the documentation (I think the DEBUG env variable was mentioned as missing by somebody internally as well).

We recommend setting DEBUG for any local development work.