Skip to content

fastapi/server static assets#11967

Merged
RayBB merged 3 commits intomasterfrom
fastapi/server-static-assets
Mar 1, 2026
Merged

fastapi/server static assets#11967
RayBB merged 3 commits intomasterfrom
fastapi/server-static-assets

Conversation

@RayBB
Copy link
Collaborator

@RayBB RayBB commented Mar 1, 2026

Summary

This PR is preparation work for the FastAPI migration path. It aligns static asset serving between web (web.py) and fast_web (FastAPI) so both stacks resolve /static/build/* consistently.

What Changed

  • Mounted the shared build artifacts volume for fast_web in compose.override.yaml:
    • ol-build:/openlibrary/static/build

Why

As we move toward serving HTML via FastAPI, we need static asset behavior to match the legacy stack. This prevents chunk/file mismatches between ports 8080 and 18080 and gives us a stable base for upcoming HTML route migration.

Verification

  • Restarted fast_web with updated compose config.
  • Confirmed both stacks serve the same chunk with HTTP 200:
    • /static/build/js/8839.b619318e1c5edfe88649.js on web
    • /static/build/js/8839.b619318e1c5edfe88649.js on fast_web

Works on testing:
https://testing.openlibrary.org/_fast/static/build/js/8839.d97e9cf55cfab38947b5.js

Screenshot

Stakeholders

@RayBB RayBB force-pushed the fastapi/server-static-assets branch from f632366 to 289df48 Compare March 1, 2026 18:49
@RayBB
Copy link
Collaborator Author

RayBB commented Mar 1, 2026

Works on testing. We aren't going to be using this until we start migrating html pages over but this along with #11966 brings us even closer.

@RayBB RayBB merged commit 45bfba0 into master Mar 1, 2026
8 checks passed
@RayBB RayBB deleted the fastapi/server-static-assets branch March 1, 2026 18:51
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.

1 participant