Cloudflare migration - #227
Merged
Merged
Conversation
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>
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.
No idea why this wasn't merged, let's investigate