-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Feature] Add Cloudflare Worker as deployment option #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Add Cloudflare Worker as deployment option #170
Conversation
|
@Biki-dev is attempting to deploy a commit to the dayuanjiang's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@DayuanJiang pls review |
|
Thanks again! I’ll review it shortly. One small suggestion: since the added doc is quite long, it would be nicer as a separate file (easier to read and maintain). Out of curiosity — have you tried deploying this change on Cloudflare yourself yet? |
Yes i did |
- Move Cloudflare_Deploy.md to docs/ folder - Add 'Deploy without R2' option for simple/free deployments - Add workers.dev subdomain registration instructions - Add missing global_fetch_strictly_public flag - Add troubleshooting for common deployment issues - Update README.md link to new location
Resolved conflicts in package.json and package-lock.json: - Combined cloudflare scripts (preview, deploy, upload, cf-typegen) with electron scripts - Added @opennextjs/cloudflare dependency - Updated @openrouter/ai-sdk-provider to ^1.5.4 - Added wrangler to devDependencies - Preserved wait-on and overrides from main
- Use dynamic import for @opennextjs/cloudflare to avoid loading workerd during builds - Regenerate package-lock.json with cross-platform dependencies
- Use main branch's package-lock.json as base to ensure cross-platform deps - Add @opennextjs/cloudflare and wrangler
|
Tested the deployment and it works! Made a few fixes:
|
…s-provider * origin/main: feat: improve quota toast with ByteDance Doubao sponsorship info and model config button (DayuanJiang#447) feat: add doubao provider and ByteDance sponsorship (DayuanJiang#329) feat: move History and Download buttons to Settings dialog for cleaner chat interface (DayuanJiang#442) fix(deps): update dependency jsdom to v27 (DayuanJiang#438) chore(deps): update dependency node to v24 (DayuanJiang#435) fix(deps): update dependency open to v11 (DayuanJiang#439) chore(deps): update docker/build-push-action action to v6 (DayuanJiang#436) [Feature] Add Cloudflare Worker as deployment option (DayuanJiang#170) chore: add enhancement issue template (DayuanJiang#434) chore(deps): update aws-actions/configure-aws-credentials action to v5 chore(deps): update actions/setup-node action to v6 style: auto-format with Biome chore(deps): update actions/checkout action to v6 fix(deps): update minor and patch dependencies style: auto-format with Biome style: auto-format with Biome chore(deps): update radix ui packages chore(deps): update core framework packages feat: migrate DynamoDB quota to composite key schema (DayuanJiang#426) fix: switch app logo based on theme
Summary
This PR adds a detailed, beginner-friendly deployment guide for running the project on Cloudflare Workers with R2-backed Incremental Static Regeneration (ISR). It includes step-by-step instructions for creating the R2 bucket, configuring
open-next.config.ts, and the requiredwrangler.jsoncchanges, plus troubleshooting tips for Windows users.What I changed
docs/Cloudflare_Workers_Deploy.mdor README section)open-next.config.tsexamples for enabling R2wrangler.jsoncexample withr2_bucketsbinding.dev.varsusage and .env.local guidanceHow to test
next-inc-cachein Cloudflare.open-next.config.tsandwrangler.jsoncper the new docs.Closes #146