Skip to content

Cloudflare migration - #227

Merged
Gizmotronn merged 3 commits into
mainfrom
cloudflare-migration
Jul 26, 2026
Merged

Cloudflare migration#227
Gizmotronn merged 3 commits into
mainfrom
cloudflare-migration

Conversation

@Gizmotronn

Copy link
Copy Markdown
Member

No idea why this wasn't merged, let's investigate

Gizmotronn and others added 3 commits July 24, 2026 12:16
Set up @opennextjs/cloudflare so this app (real API routes, server actions,
server-side Pocketbase admin auth -- not a static SPA like Atlas) can deploy
to Cloudflare Workers instead of Vercel: open-next.config.ts, wrangler.jsonc
(Workers + Assets), cf:preview/cf:deploy/cf:typegen scripts, and a
deploy-cloudflare.yml GH Action that builds, deploys via wrangler-action, and
syncs runtime secrets (Pocketbase admin creds, Clerk secret key) on every
push to main.

Validated locally end-to-end before wiring CI: built with the adapter, ran
`wrangler deploy --dry-run` then a real deploy to a throwaway workers.dev
URL, confirmed Clerk middleware and the Pocketbase-backed telescope viewport
route both execute correctly under workerd.

Also pushed the secrets/vars this workflow needs to the Signal-K/client repo:
CLOUDFLARE_ACCOUNT_ID, POCKETBASE_URL (the live signal-k-starsailors Fly
instance), POCKETBASE_ADMIN_EMAIL/PASSWORD, CLERK_SECRET_KEY and
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY (pulled fresh via `clerk env pull --instance
prod` -- the values previously in Vercel's production env were empty/test-mode),
and the four NEXT_PUBLIC_CLERK_*_URL repo variables. CLOUDFLARE_API_TOKEN is
still missing -- Actions secrets are write-only and the local wrangler OAuth
session isn't allowed to mint new API tokens, so that one has to come from
whoever owns the Cloudflare dashboard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Routes the production domain and www subdomain directly to the
starsailors-client Worker now that the Cloudflare zone is active.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Gizmotronn
Gizmotronn merged commit 5fc075d into main Jul 26, 2026
2 checks passed
@Gizmotronn
Gizmotronn deleted the cloudflare-migration branch July 26, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant