Skip to content

docs(self-hosted): static Astro serving replaces Next.js + cache proxy - #6725

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787505289-self-hosted-static-astro
Open

docs(self-hosted): static Astro serving replaces Next.js + cache proxy#6725
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787505289-self-hosted-static-astro

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

The self-hosted docs container no longer runs a Next.js server behind a caching proxy: the docs site is pre-rendered as a static build inside the image and served off disk. That makes the self-hosted docs pages describing cache warmup, cache-proxy tuning, and Node heap sizing wrong, and it means the server-tuning environment variables customers may have in their Dockerfiles and Kubernetes manifests no longer do anything. This PR deletes that stale configuration surface, corrects the base-path and health-check descriptions to the static model, and adds a changelog entry telling customers which variables to remove. Serving is faster and more predictable, and self-hosted configuration is smaller.

Implements docs for: feat(self-hosted): serve self-hosted docs with Astro static output (fern-api/fern-platform#13991)

Changes

fern/products/docs/pages/self-hosted/self-hosted-set-up.mdx

  • Removed the Cache warmup and Cache proxy sections and the NODE_MEMORY_LIMIT row. Verified gone from the container in the PR diff and absent from servers/self-hosted/ on main: NODE_MEMORY_LIMIT, WARMUP, WARMUP_TIMEOUT, CACHE_MAX_ENTRIES, CACHE_MAX_ENTRY_SIZE, CACHE_DEFAULT_TTL, CACHE_CDN_TTL, CACHE_DISABLED, CACHE_PROXY_DEBUG.
  • Kept CUSTOM_DOMAIN, FERN_LOG_LEVEL, NEXT_PUBLIC_BASE_PATH, CORS_PROXY_ALLOWED_DOMAINS, and ENABLE_JAEGER — all still read by the container (scripts/run.sh, scripts/static-server/config.ts).
  • Rewrote the runtime base-path tab: the base path is compiled into every URL of the static site, so a runtime value that differs from the build-time one re-renders the site at startup, which requires the builder to still be in the image (FERN_KEEP_BUILD_TOOLS=1 or runtime generation) and remains incompatible with readOnlyRootFilesystem: true (scripts/run.sh static-site block).

fern/products/docs/pages/self-hosted/health-check-endpoints.mdx

  • "Next.js docs server (via root endpoint)" → static docs server; readiness now probes the static server's /__health plus the docs landing page (scripts/readiness.sh, scripts/liveness.sh). Ports 3000/8081 and the /liveness, /readiness, /health contracts are unchanged.

fern/products/docs/pages/self-hosted/self-hosted-static-export.mdx

  • Preview workflow no longer sets -e WARMUP=true, and the readiness gate uses the documented http://localhost:8081/readiness probe instead of the removed admin-token-gated /__cache/stats endpoint (scripts/export.sh now uses /__admin/export and /tmp/.fern-admin-token; /scripts/export.sh and the export tarball path are unchanged).

fern/products/docs/pages/changelog/2026-08-23.mdx — new entry listing the removed variables.

Note for reviewers

The On-page feedback section on the setup page documents [fern-docs-feedback] stdout logs. That handler lives in the Next.js bundle route (packages/fern-docs/bundle/.../api/fern-docs/feedback-log/route.ts) and I found no equivalent in the self-hosted static server, but PR #13991 doesn't touch it, so I left the section alone rather than guess. Worth confirming it still works in the static container.

Validation

  • pre-commit run --files <changed>: passes (remaining Vale warnings are on pre-existing lines).
  • cd fern && npx fern-api@5.59.0 check --warnings: 0 errors.

Link to Devin session: https://app.devin.ai/sessions/b7e8e7bf59294e0db199eec091ecf8db

…env vars

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

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.

0 participants