Skip to content

fix(uwsgi): add static-map for static files and user-media uploads#372

Merged
Sancus merged 1 commit intostagefrom
fix/uwsgi-static-map
Mar 19, 2026
Merged

fix(uwsgi): add static-map for static files and user-media uploads#372
Sancus merged 1 commit intostagefrom
fix/uwsgi-static-map

Conversation

@e9e4e5f0faef
Copy link
Copy Markdown
Collaborator

Summary

  • Add uWSGI --static-map directives to the Fargate entrypoint for /static/ and /user-media/ paths
  • Fixes 404 errors on all static assets reported after DNS cutover to ECS

Changes

File Change
docker/docker-entrypoint.sh Add --static-map=/static and --static-map=/user-media to start_web() uWSGI command

Why

The legacy EC2 setup uses olympia.ini with static-map directives to serve static files and user-uploaded media directly from uWSGI. Our Fargate entrypoint did not carry these over, resulting in 404s for all /static/ and /user-media/ paths.

Reference: thundernest-ansible/addons/olympia.ini lines 55-56.

Validation

  • Confirmed the exact static-map paths match the Ansible config
  • /static/ maps to /data/olympia/site-static/ (built into the Docker image)
  • /user-media/ maps to $NETAPP_STORAGE_ROOT/shared_storage/uploads/ (falls back to /tmp/storage when EFS is not mounted)

Safety

No impact on running services until the new image is deployed. Static file serving is read-only by nature.

Follow-up

EFS mount targets and task definition volumes for persistent user-media storage will be addressed in a separate infrastructure PR.

@e9e4e5f0faef e9e4e5f0faef requested a review from Sancus March 19, 2026 19:50
@e9e4e5f0faef e9e4e5f0faef self-assigned this Mar 19, 2026
@Sancus Sancus merged commit dbd122f into stage Mar 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants