Instead of cloning emdash-patch repo, clone official emdash and apply
4-line sed patch to built virtual_astro_middleware.mjs. This avoids
workspace:* dependency issues that were breaking the backend.
The sed patch fixes apiSuccess() wrapper mismatch for media browser
and image upload in the visual editor toolbar.
- Add rm -rf dist before pnpm build for blog-template
- Ensure db.ts and astro.config changes are picked up
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add build steps for audit-log and gutenberg-to-portable-text
- Change WORKDIR to /app/emdash so workspace symlinks resolve
- Adapt entrypoint.sh paths for /app/emdash workspace
- Copy seed file and create storage directory
- Copy audit-log and gutenberg-to-portable-text to node_modules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The pnpm isolated linker puts packages deep in .pnpm/store. Adding
node-linker=hoisted to .npmrc makes pnpm hoist packages like npm, so
react is accessible at /app/node_modules/react.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The "insufficient_scope: authorization failed" error meant the "builder" stage
name didn't exist. Using single stage where deps builds AND provides artifacts
via --from=0.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Builder stage has /app/emdash/node_modules with all workspace deps
including react. Deps stage only has blog-template deps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dependencies like react and react-dom come from the workspace root catalog,
not from individual packages. Need to install all workspace packages
first so the root node_modules is populated.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The monorepo workspace roots node_modules at /app/emdash/node_modules,
not in individual packages. Copy from workspace root to get all deps.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clones full emdash monorepo (with image upload fix), adds blog template
as a workspace package, builds everything together. No package copying
required - workspace resolution handles everything.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The -L flag on cp still follows symlinks deeply in this monorepo.
Instead copy only dist/ and src/ and package.json directly without -L.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changes:
- Build all packages (core, auth, blocks, admin) from source
- Copy packages with -L dereferencing symlinks so deps resolve properly
- Use emdash@0.9.0 from npm (source packages include their own deps)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The @emdash-cms/auth package needs its node_modules (ulidx, etc.) to be
linked. Running pnpm install after copying it restores the proper links.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The exports map in package.json is needed at build time to resolve
"@emdash-cms/auth/adapters/kysely". Copying just dist/ loses the
exports field in package.json causing resolution to fail.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The @emdash-cms/auth package needs its built dist/ folder copied,
not the raw src. Also builds auth package after core.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolves build error: Rollup failed to resolve import
"@emdash-cms/auth/adapters/kysely" from emdash middleware.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Changed database path to ./storage/data.db
- Changed uploads path to ./storage/uploads
- Updated Dockerfile to create storage/uploads dir (not uploads)
- Updated entrypoint.sh to check /app/storage/data.db
- Removed COPY of uploads from builder to runner
Now all persistent data is in /app/storage/:
- /app/storage/data.db (SQLite database)
- /app/storage/uploads/ (uploaded media)
Easypanel mount: emdash-storage → /app/storage
To update EmDash: change version in package.json → push → redeploy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove emdash seed from Dockerfile build stage (no longer overwrites DB)
- Add entrypoint.sh that checks if data.db exists before seeding
- First launch: seed runs to populate DB
- Subsequent redeploys: DB exists, seed skipped, data preserved
- Also remove COPY data.db from runner stage (volume mount handles persistence)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed index.astro: escaped curly braces in code display block
to prevent Astro parser misinterpreting them as expressions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>