ADR-0003 Cloudflare Pages Target
Status
Section titled “Status”Accepted
Context
Section titled “Context”Both applications are static Astro sites. We require a hosting platform that supports static assets, preview environments, and future Access controls without managing infrastructure.
Decision
Section titled “Decision”- Deploy
apps/siteandapps/docsto separate Cloudflare Pages projects. - Delay Workers and more complex edge runtime usage until clear requirements emerge.
Rationale
Section titled “Rationale”- Pages offers automatic previews, CDN distribution, and simple configuration.
- Separate projects allow independent access policies (public vs internal).
- Avoids premature investment in custom infrastructure.
Consequences
Section titled “Consequences”- Dynamic features (forms, personalization) remain out of scope until a Worker BFF is introduced.
- Release workflow relies on manual promotion until CI/CD is established.
- Security headers must be managed within Cloudflare settings.
Deferred Considerations
Section titled “Deferred Considerations”- Introducing Cloudflare Workers for dynamic endpoints or authenticated APIs.
- Implementing CI/CD pipelines that trigger Pages deployments automatically.
- Aligning Cloudflare Access groups with corporate SSO.
Implementation Steps
Section titled “Implementation Steps”- Create two Pages projects: marketing (root domain) and internal docs (subdomain).
- Configure build commands and output directories per the Cloudflare Pages runbook.
- Document DNS and Access policies prior to launch.
Verification Method
Section titled “Verification Method”- Successful manual builds:
pnpm build:siteandpnpm build:docsinside Docker. - Pages preview deployments render correctly for both applications.
- Access controls confirmed for the docs project before production promotion.