Skip to content

feat: deploy Next.js web app on Cloudflare Workers - #31

Merged
dylsteck merged 1 commit into
mainfrom
feat/web-cloudflare-workers
Aug 17, 2026
Merged

feat: deploy Next.js web app on Cloudflare Workers#31
dylsteck merged 1 commit into
mainfrom
feat/web-cloudflare-workers

Conversation

@dylsteck

Copy link
Copy Markdown
Owner

Summary

  • Host apps/web as a Cloudflare Worker (ship-web) via @opennextjs/cloudflare + Wrangler, matching the dylsteck.com Worker deploy pattern.
  • Keep the existing Docker / Coolify path: DEPLOY_TARGET=node still produces Next standalone on port 3000.
  • Add pnpm deploy:web, CI deploy on main, and Wrangler secrets / build-time env docs.

Notes

  • OpenNext gzip is ~4.3 MiB, which exceeds the 3 MiB Workers Free script-size limit. Enable Workers Paid (10 MiB gzip) before pnpm deploy:web.
  • After the first deploy, add the web origin to the API Worker ALLOWED_ORIGINS and set GitHub OAuth callback URLs.

Test plan

  • pnpm --filter web lint && pnpm --filter web typecheck && pnpm --filter web test && pnpm --filter web build
  • cd apps/web && pnpm preview (OpenNext / workerd)
  • Docker still builds standalone (DEPLOY_TARGET=node)
  • After Workers Paid: pnpm deploy:web, then hit https://ship-web.<account>.workers.dev
  • Confirm API CORS and GitHub OAuth still work against the new origin

Made with Cursor

Host apps/web with OpenNext + Wrangler (ship-web) while keeping the Docker standalone image for Coolify.

Co-authored-by: Cursor <cursoragent@cursor.com>
@dylsteck
dylsteck merged commit add4127 into main Aug 17, 2026
5 checks passed
@dylsteck
dylsteck deleted the feat/web-cloudflare-workers branch August 17, 2026 03:37
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