Repository navigation
prm: production Dockerfile; trace PGlite assets into .output - #49
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Adds app/prm/Dockerfile (build from repo root, filtered pnpm install of the PRM's workspace closure, runtime = .output only, non-root, /data volume, HEALTHCHECK on /api/cms/v1/health). No secrets at build time. Nitro was bundling @electric-sql/pglite, dropping pglite.data and the pg_trgm extension bundle, so the default embedded store never opened in a production build (health 503: connection acquisition timed out). Trace it as a dependency instead, same pattern as app/base does for QuickJS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
events.ts is reachable from the client (router.tsx -> cms.config.ts) and statically imported systemContext from @tanstack/cms-core/server, which pulled the server runtime (new AsyncLocalStorage from node:async_hooks) into the browser chunk. In a production build hydration crashed with 'L.AsyncLocalStorage is not a constructor', leaving /setup stuck on 'Loading setup…'. Import it lazily inside the handlers, alongside the existing dynamic import of @tanstack/cms-api (same pattern as app/base). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Settings route rendered PageHeader outside PageMain, so the header escaped the centred max-width column and sat flush against the viewport edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
de7c3ae to
4cc1d8f
Compare
@tanstack/cms-api
@tanstack/cms-cli
@tanstack/cms-client
@tanstack/cms-compat-wp
@tanstack/cms-connect-atproto
@tanstack/cms-migrate-wp
@tanstack/cms-skills
@tanstack/cms-core
@tanstack/cms-media-s3
@tanstack/search-ai
@tanstack/search-cms
@tanstack/search-core
@tanstack/search-headless
@tanstack/search-ui-react
@tanstack/cms-store-postgres
@tanstack/cms-ui-dom
@tanstack/cms-ui-react
commit: |
Summary
app/prm/Dockerfile: a production image for the PRM, built from the repo root.pnpm install --filter 'prm...')..output, runs as non-root, and keeps its data on a/datavolume (PRM_DATA_DIR).HEALTHCHECKhits/api/cms/v1/health.app/prm/vite.config.ts: makes Nitro trace@electric-sql/pgliteinstead of bundling it, the same patternapp/baseuses for QuickJS.pglite.dataand thepg_trgmextension bundle, so the embedded store never opened in a production build.CMS Postgres connection acquisition timed out.app/prm/src/events.ts: importssystemContextfrom@tanstack/cms-core/serverlazily inside the handlers.new AsyncLocalStorage) into the client bundle.L.AsyncLocalStorage is not a constructor) and/setupstayed stuck on "Loading setup…".main.app/prm/src/routes/prm-settings.tsx: movesPageHeaderinsidePageMain. It was the only route rendering the header outside the max-width column, so the Settings title sat flush against the left edge of the viewport.Why
This lets the PRM deploy to Jack's Mac Studio through Komodo for the AI Coding Summit.
mainand buildsprm:<sha>from this Dockerfile./api/cms/v1/healthand rolls back to the last good image if that check fails.Testing
/setup, then create the owner, then/,/people,/groups,/stale,/askand/prm-settings. There were no page errors and no 5xx responses.{"ok":true,"schema":{"current":9,"latest":9}}), and/redirected to/setup./api/prm-auth/setup, recreated the container, and logged in again. The data persisted on the volume.🤖 Generated with Claude Code
Summary by CodeRabbit