feat(docs): forward DOCS_SITE_URL through Dockerfile build args#1685
Conversation
prerender.ts and build-llms-artifacts.ts already read process.env.DOCS_SITE_URL to build canonical URLs, og:url, sitemap entries, etc. — but it wasn't plumbed through the Dockerfile, so production builds always fell back to the 'https://docs.tale.dev' default. Mirror the existing DOCS_BASE_URL pattern: declare ARG + ENV in the builder stage, forward via compose.docs.yml build args. Default keeps the docs.tale.dev value for the canonical deployment.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Follow-up to #1684.
prerender.tsandbuild-llms-artifacts.tsboth already readprocess.env.DOCS_SITE_URLto compose canonical URLs,og:url, sitemap entries, and the absolute URLs inllms.txt/llms-full.txt. But the value wasn't plumbed through the Dockerfile, so every production build silently fell back to the hardcodedhttps://docs.tale.devdefault — the only knob the host had over canonical URLs was editing the source.Change
services/docs/Dockerfile— addARG DOCS_SITE_URLandENV DOCS_SITE_URL=...next to the existingDOCS_BASE_URLplumbing.compose.docs.yml— forwardDOCS_SITE_URLfrom the host env to the build args.The default
https://docs.tale.devkeeps the canonicaldocs.tale.devdeployment unchanged.Pre-PR checklist
bun run check— N/A (Dockerfile + compose only, no JS/TS touched).services/platform/messages/{en,de,fr}.json— N/A./docs/{en,de,fr}/— N/A.bun run --filter @tale/docs lint/test— N/A (no source changes).README.mdand translations — N/A.Test plan
DOCS_SITE_URL=https://tale.dev/docs DOCS_BASE_URL=/docs/ docker compose -f compose.docs.yml build→ built HTML in/dist/index.htmlshould have<link rel="canonical" href="https://tale.dev/docs/" />and matchingog:url.<link rel="canonical" href="https://docs.tale.dev/" />.