← Wiki

Infrastructure: Cloudflare by default, exceptions by name

2026-04-07 summary infracloudflarewranglerworkersd1serverlessdeployment

What the plan said, and what happened

The raw doc 1-methodology/infra-prd.md describes the earlier plan: two tools, SST for serverless and Pulumi for VPS, with Hetzner and Fly.io as further tiers. Practice went elsewhere. On 27 Oct 2026 the active projects contain no sst.config.ts and no Pulumi.yaml, and 28 wrangler configs across 13 projects.

The first principle survived: one project, one deploy config, kept in the repo. The wrangler file became that config. It names the Worker and binds its database, buckets and cron triggers, and wrangler deploy applies it, so a second layer on top had nothing left to do.

What runs on Cloudflare

Kind Projects Typical use
Worker + D1 8 APIs, cron jobs, small relational data
Static assets on Workers 5 sites, including a Next.js app built with OpenNext
Pages 4 Astro and static landings; this blog too
Durable Objects 2 per-room state in a video-call app; the binding behind a container
Containers 1 a Rust server binary that sleeps after 10 idle minutes

One repo often uses several kinds at once. Postgres and auth, where a product needs accounts, come from Supabase (6 active projects have a supabase/ directory). The account is on Workers Paid, $5 a month; the analytics counter alone would fit the free plan.

The exceptions, each with a reason

Nothing runs on Hetzner. One project keeps a fly.toml as an escape hatch; its production runs on Cloudflare Containers.

Decision rule

  1. Static site or landing: static assets on Workers, or Pages.
  2. API, cron job, small database: a Worker with D1, plus R2 or KV.
  3. State that has to live in one place (a room, a counter): a Durable Object.
  4. A process the Worker runtime cannot host: Cloudflare Containers if it can sleep when idle, the VPS if it must run all the time.
  5. Needs a residential IP: the Mac, and the repo says so.

What others found since (Oct 2026)

Connections

Sources

Related