Repository navigation
Host apso.ai on Cloudflare Workers via Pulumi (#28) - #34
Merged
Merged
Conversation
This was referenced Oct 25, 2026
…m for zone, DNS, Worker, Access (#28) - @opennextjs/cloudflare 1.20.13 (newest; accepts Next 16.4.3) and wrangler 4.152, wrangler.jsonc, open-next.config.ts with the static-assets cache (every page is prerendered), cf:build/cf:preview/cf:deploy. - public/_headers: immutable cache for /_next/static. - infra/: Pulumi TypeScript program. Zone, the 9 non-site Route 53 records (generated by infra/scripts/export-route53.sh, read-only), the Worker, Worker secrets via wrangler secret bulk, apex custom domain and www redirect behind serveApex, Access on preview URLs for Google sign-ins. - deploy/infra-secrets.env and SECRETS_ENV in scripts/with-secrets.sh, so missing Cloudflare items do not break `with-secrets.sh npm run dev`. - Root tsconfig and ESLint ignore infra/ and the Cloudflare build output.
…previews (no Access), S3 state with KMS secrets - Pulumi.yaml pins the S3 backend; prod stack created with the awskms secrets provider; accountId and workersDevSubdomain set as plain config. - Remove the Access identity provider, policy and app, and the Google and passphrase 1Password refs. - deploy/infra-secrets.env now holds only CLOUDFLARE_API_TOKEN.
…a Worker route Moving the name servers with serveApex=false left apso.ai without a record. The site records now mirror Route 53, and the cutover flips them to proxied and adds an apso.ai/* route, all in-place updates, so the name server move and the switch to the Worker are separate, reversible steps.
cultron
force-pushed
the
feat/cloudflare-pulumi
branch
from
October 26, 2026 18:39
e9ea981 to
afa7ed9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28. Stacked on #33 (the redesign); merge #33 first, then retarget this to
main.apso.ai has run from this branch since 2026-10-25 21:36 UTC. The Worker was deployed with
npm run cf:deployfrom this branch, and Pulumi state (S3 + KMS, pinned ininfra/Pulumi.yaml) matchesinfra/.What it does
@opennextjs/cloudflare) build:wrangler.jsonc,open-next.config.ts,cf:build/cf:preview/cf:deployscripts.infra/creates:infra/dns-records.ts)wrangler secret bulk, values from 1Password)apso.ai/*Worker route, and the www → apex and http → https redirectsinfra/README.md:serveApex=trueflips both site records to proxied and adds the route. Nothing is deleted. Rollback isserveApex=false+pulumi up.Verified live
https://apso.ai/*returns 200 from the Worker (x-opennext: 1).wwwandhttpreturn 301 tohttps://apso.ai, keeping the path and query.apso.aiand*.apso.ai.After merge
mainas the production branch. Until then, deploys arecf:deployonly. Do not connect it before this lands onmain, or the next push tomaindeploys the old site.Cloudflare API token permissions used: Workers Scripts Edit, Zone Read, DNS Edit, Workers Routes Edit, Bot Management Edit, Single Redirect Edit, SSL and Certificates Read.