fix: add nginx to serve static files #6

Merged
wazolab merged 3 commits from fix/static-files-404 into develop 2026-04-04 11:43:33 +00:00
Owner

Summary

  • All static assets (CSS/JS) returned 404 because uvicorn does not serve files from STATIC_ROOT
  • Add nginx as reverse proxy on port 8000 to serve /static/ and /uploads/ directly
  • Uvicorn now listens on port 8001 (internal only)
  • Construct REDIS_URL from individual Cloudron addon vars instead of relying on CLOUDRON_REDIS_URL
  • Add dedicated /healthcheck endpoint in nginx (Cloudron best practice)
  • Propagate X-Forwarded-Proto from Cloudron's reverse proxy

Note on version downgrade

The upstream version is changed from 3.7.1 to 3.6.1 to match the currently published Docker image (umap/umap:3.6.1). Version 3.7.1 does not exist yet upstream.

Test plan

  • Rebuild Docker image and deploy to Cloudron
  • Verify static assets load (no 404 in console)
  • Verify map creation and WebSocket collaboration work
  • Verify healthcheck responds at /healthcheck
## Summary - All static assets (CSS/JS) returned 404 because uvicorn does not serve files from STATIC_ROOT - Add nginx as reverse proxy on port 8000 to serve `/static/` and `/uploads/` directly - Uvicorn now listens on port 8001 (internal only) - Construct `REDIS_URL` from individual Cloudron addon vars instead of relying on `CLOUDRON_REDIS_URL` - Add dedicated `/healthcheck` endpoint in nginx (Cloudron best practice) - Propagate `X-Forwarded-Proto` from Cloudron's reverse proxy ## Note on version downgrade The upstream version is changed from 3.7.1 to 3.6.1 to match the currently published Docker image (`umap/umap:3.6.1`). Version 3.7.1 does not exist yet upstream. ## Test plan - [ ] Rebuild Docker image and deploy to Cloudron - [ ] Verify static assets load (no 404 in console) - [ ] Verify map creation and WebSocket collaboration work - [ ] Verify healthcheck responds at `/healthcheck`
Static assets returned 404 because uvicorn alone does not serve files
from STATIC_ROOT. Add nginx as a reverse proxy on port 8000 that serves
/static/ and /uploads/ directly, and forwards all other requests
(including WebSocket) to uvicorn on port 8001.
- Construct REDIS_URL from individual Cloudron addon vars
  (CLOUDRON_REDIS_HOST, CLOUDRON_REDIS_PORT, CLOUDRON_REDIS_PASSWORD)
  instead of relying on CLOUDRON_REDIS_URL which may not exist
- Add /healthcheck endpoint in nginx (returns 200 without hitting
  uvicorn) and update CloudronManifest healthCheckPath accordingly
- Propagate X-Forwarded-Proto from Cloudron's reverse proxy instead
  of using $scheme which would always be http internally
wazolab merged commit 6d87d3372e into develop 2026-04-04 11:43:33 +00:00
wazolab deleted branch fix/static-files-404 2026-04-04 11:43:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wazolab/cloudron-umap!6
No description provided.