9. Canonical hostnames and local Cloudflare deploy
Date: 2026-05-03
Status
Accepted
Context
We need stable production URLs for the internal documentation site and the Keepin' Tracks web app, and we want to deploy from local builds to Cloudflare (Pages + Workers) to avoid relying on continuous deployment while iterating.
Decision
Canonical hostnames
| Hostname | Product |
|---|---|
https://devdocs.keepintracks.com | Docusaurus internal docs (apps/docs build output). Configured in apps/docs/docusaurus.config.ts (url). |
https://personal.keepintracks.com | Keepin' Tracks web client (apps/tracks-web). Shared constant APP_HOST in @keepin/tracks-contracts; API CORS in apps/tracks-api must allow this origin. |
Local deploy
- Use Wrangler (pinned in the monorepo root) after
bun run docs:build,bun run tracks-web:build, andbun run --cwd apps/tracks-api deployas documented in Deployment & access. - Cloudflare Pages projects use example names
keepin-devdocsandkeepin-personalin npm scripts; rename in Cloudflare or override the--project-name/ Worker name to match your account. - One-time auth:
wrangler loginper machine.
Consequences
- Positive: Clear URLs for docs vs product; SEO and sharing stay consistent.
- Positive: Local deploy keeps iteration cheap and avoids GitHub-hosted build minutes when CI is narrowed.
- Tradeoff: Custom domains and TLS certificates are configured in the Cloudflare dashboard, not in this repo.