docs(frontend): document CDN deployment with Inertia SSR - #85
Open
RomainLanz wants to merge 2 commits into
Open
RomainLanz wants to merge 2 commits into
RomainLanz wants to merge 2 commits into
Conversation
Explain how to configure the same asset URL at build time and runtime, and upload client assets without publishing manifests or SSR bundles. Keep the server files local and retain old hashed client assets during rolling deployments. Document the opt-in static file index and its restart requirement.
Deploying adonisjs-v7-docs with
|
| Latest commit: |
954d80d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4da62b8d.adonisjs-v7-docs.pages.dev |
| Branch Preview URL: | https://docs-inertia-cdn-static-inde.adonisjs-v7-docs.pages.dev |
Fix the SSR bundle filename, document the build failure when CDN_ASSETS_URL is missing, and move the upload restrictions into warnings with a solution each. Align the deployment guide and the assetsUrl reference example with the new CDN workflow. Move the indexFiles option to the end of the static options list and fix the entryPoints casing in the API client and Edge reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
indexFilesis not available yet. The option is added by adonisjs/static#11, which is still open, and the latest@adonisjs/staticrelease (v2.0.1) does not include it. Do not merge this PR before that one is merged and released.The CDN guide explains assetsUrl but does not show how to upload Inertia client assets while keeping the SSR files private and available locally.
The guide now uses one CDN_ASSETS_URL at build time and runtime, and uploads client assets from the completed build artifact with aws s3 sync. It excludes manifests and server bundles, retains old hashed assets, and covers CORS, MIME types, cache policy, and deployment ordering.
The Inertia guide explains which files SSR needs locally and links to this workflow. The static file guide documents the new opt-in indexFiles option and its immutable-directory requirement.
Verification: all three changed Markdown files parse with edge-markdown without diagnostics; git diff --check passes. An Inertia SSR test keeps only local manifests and server bundles, disables the static middleware, and verifies the generated JS, CSS, and image URLs against a separate HTTP asset origin.
No real CDN upload was performed.
The deployment guide now points to the CDN workflow instead of telling readers to upload all of
build/public. TheassetsUrlreference example and theentryPointscasing in the API client and Edge reference are aligned with it.