You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ The canonical deployment is a Next.js application on Cloudflare Workers through
75
75
1. authenticate the Cloudflare account with `pnpm --filter @planr/docs exec alchemy login --configure`; Alchemy stores local OAuth credentials in its profile, not in `.env`;
76
76
2. use `.env.example` only when overriding the public canonical origin for a local build;
77
77
3. validate locally with `pnpm docs:build` and optionally `pnpm docs:alchemy:dev`;
78
-
4. deploy production with `pnpm docs:deploy` from the repository root; the package script pins `--stage prod` explicitly;
78
+
4. deploy production with `pnpm docs:deploy` from the repository root; the package script pins `--stage prod`, accepts the non-interactive Alchemy plan, and populates the read-only OpenNext SSG cache;
79
79
5. verify the emitted URL and `https://planr.so` with the release-live and browser gates.
80
80
81
81
`apps/docs/alchemy.run.ts` is the infrastructure source of truth. It uses the Alchemy v2 Effect stack and Cloudflare remote state. `Cloudflare.Website.StaticSite` runs OpenNext, passes the result through Wrangler's local dry-run bundler, and deploys `.alchemy-worker/worker.js` with `bundle: false`. It adopts the named Worker when it already exists and binds `planr.so` only for `prod`. `NEXT_PUBLIC_SITE_URL` is set to the canonical production origin during that build.
The command deploys the Alchemy production stack and then populates OpenNext's read-only static-assets incremental cache with the prerendered documentation routes. Keep both steps together: without cache population, Cloudflare must execute the OpenNext server path for every SSG request.
25
+
24
26
`apps/docs/alchemy.run.ts` is authoritative. `Cloudflare.Website.StaticSite` runs OpenNext and Wrangler's local dry-run bundler, uploads the resulting `.alchemy-worker/worker.js` with `bundle: false`, and serves `.open-next/assets`. The extra local bundle step retains OpenNext's Wrangler-compatible runtime behavior while keeping the compressed Worker below Cloudflare's 3 MiB Free-plan limit. It adopts the named `planr-docs-prod` Worker when present and passes `domain: 'planr.so'` only for the `prod` stage. The `planr.so` zone must already be available in the authenticated Cloudflare account; Cloudflare provisions the Worker custom-domain record and certificate. `Cloudflare.state()` keeps stack state remotely available to local and CI deploys.
25
27
26
28
For Cloudflare-local development, use `pnpm docs:alchemy:dev`. Normal content work can continue to use `pnpm docs:dev` without cloud credentials.
'apps/docs deploy must target the Alchemy prod stage and populate the OpenNext SSG cache',
130
+
);
128
131
assert(packageJson.scripts.destroy==='alchemy destroy --stage prod','apps/docs destroy must target the Alchemy prod stage explicitly');
129
132
assert(packageJson.scripts['build:worker']==='opennextjs-cloudflare build --skipWranglerConfigCheck','worker build must use OpenNext');
130
133
assert(packageJson.scripts['bundle:worker']==='wrangler deploy --dry-run --outdir .alchemy-worker','worker bundle must use Wrangler without deploying');
0 commit comments