Skip to main content

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

HostnameProduct
https://devdocs.keepintracks.comDocusaurus internal docs (apps/docs build output). Configured in apps/docs/docusaurus.config.ts (url).
https://personal.keepintracks.comKeepin' 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, and bun run --cwd apps/tracks-api deploy as documented in Deployment & access.
  • Cloudflare Pages projects use example names keepin-devdocs and keepin-personal in npm scripts; rename in Cloudflare or override the --project-name / Worker name to match your account.
  • One-time auth: wrangler login per 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.