fix: make docker compose up work out of the box #13

Merged
mark merged 1 commits from fix/dev-setup into main 2026-02-28 21:00:10 +00:00
Owner

Fixes everything broken in local dev:

  1. WhiteNoise removed from dev middleware — it intercepts /static/ and serves from STATIC_ROOT, which is empty without collectstatic. Django's runserver handles it natively with DEBUG=True.
  2. StaticFilesStorage in dev — no manifest required.
  3. Media URL pattern addedrunserver does not serve MEDIA_ROOT automatically; uploaded images were 404ing.

All previous fixes (playwright volume, seed on startup, site record) are already on main.

Fixes everything broken in local dev: 1. **WhiteNoise removed from dev middleware** — it intercepts `/static/` and serves from `STATIC_ROOT`, which is empty without `collectstatic`. Django's `runserver` handles it natively with `DEBUG=True`. 2. **StaticFilesStorage in dev** — no manifest required. 3. **Media URL pattern added** — `runserver` does not serve `MEDIA_ROOT` automatically; uploaded images were 404ing. All previous fixes (playwright volume, seed on startup, site record) are already on main.
codex_a added 1 commit 2026-02-28 20:58:23 +00:00
fix: fix all dev static/media serving issues
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m4s
CI / ci (pull_request) Successful in 1m22s
a598727888
- Remove WhiteNoise from MIDDLEWARE in development: it intercepts /static/
  requests and serves from STATIC_ROOT, which is empty without collectstatic.
  Django's runserver serves static files natively with DEBUG=True.
- Switch to StaticFilesStorage in dev: no manifest required.
- Add media URL pattern in DEBUG mode: runserver does not serve MEDIA_ROOT
  automatically, so uploaded images were 404ing in local dev.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark merged commit 4c27cfe1dd into main 2026-02-28 21:00:10 +00:00
mark deleted branch fix/dev-setup 2026-02-28 21:00:10 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nohype/main-site#13