Skip to content

fix(deploy): serve the API on Cloudflare Workers Free - #32

Merged
RlxChap2 merged 4 commits into
mainfrom
fix/cloudflare-free-worker
Oct 4, 2026
Merged

RlxChap2 merged 4 commits into
mainfrom
fix/cloudflare-free-worker

Conversation

@RlxChap2

@RlxChap2 RlxChap2 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

The Container deployment failed at /containers/me on this Workers Free account. The API now runs directly through native Request/Response handlers without Containers or Fastify initialization in Worker module scope. Node.js/Fastify remains supported through the same controllers and route declarations.

Inflight cache I/O stays within each Worker request; stale refreshes use waitUntil. Azkar now fetches the same pinned 132-chapter corpus from jsDelivr or raw GitHub, replacing the 133-request fallback that exceeded the free subrequest budget. Audio HEAD checks use redirect: manual and reject redirects by status because workerd rejects redirect: error. OpenAPI identifies the new Azkar source.

Wrangler declares api.bonyanoss.org as the production custom domain, supports branch previews and preserves Preview URLs. The v2 migration retires the unused Container Durable Object. The Dockerfile still supports the optional Node.js deployment.

Validation on commit 138d118:

  • 207 tests passed, including OpenAPI success/error contracts for both adapters, routing, HEAD, CORS, rate limiting and request-scoped cache behavior.
  • ESLint, TypeScript, Wrangler dry run, workerd startup and live local requests passed.
  • Cloudflare deployed the branch successfully. All 30 documented JSON success responses passed schema validation on the actual Workers Free preview, including the full Quran, recitation audio and hadith. Metrics, invalid input, missing routes, full Quran search with no matches, HEAD and CORS also passed live.
  • GitHub CI including the Node.js Docker health check and CodeQL passed.

Preview: https://fix-cloudflare-free-worker-bonyan-api.relax3962.workers.dev/
Cloudflare build: https://dash.cloudflare.com/2b2187aa8e511252110cdcd6c495c521/workers/services/view/bonyan-api/production/previews/fix-cloudflare-free-worker/builds/21d66f38-c57e-437a-9b4f-64cfe35a021d

Production verification completed after merge c851b1a: Cloudflare build succeeded, deployed version d2fdf4f0-f502-434b-a67f-07b41c03546e to api.bonyanoss.org, and all 30 documented JSON success responses passed live schema validation on that domain. Main CI and CodeQL also passed. These live requests establish current functionality; they do not guarantee CPU headroom under production load. Both Azkar hosts share one data origin, and rate limiting/cache values remain isolate-local.

@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bonyan-api Ready Ready Preview Oct 4, 2026 6:35pm UTC

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-cloudflare-free-worker-bonyan-api.relax3962.workers.dev (commit 138d118)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://56e3ba43-bonyan-api.relax3962.workers.dev 138d118 2026-10-04T18:35:03.669Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://00752278-bonyan-api.relax3962.workers.dev 3d53fc1 2026-10-04T18:31:39.702Z Visit the dashboard ↗
  • Build: Success ✅

View logs ↗
No Preview URL. Enable ↗ 3a2651e 2026-10-04T18:27:38.888Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
b55e5e7 2026-10-04T18:24:58.610Z View logs ↗

@RlxChap2
RlxChap2 merged commit c851b1a into main Oct 4, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 138d1185 Deployed Oct 4, 2026 by vercel[bot]
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