Skip to content

Mounted apps/ into ghost-dev container for pnpm 11#28210

Merged
9larsons merged 1 commit into
mainfrom
fix/dev-compose-mount-apps
May 27, 2026
Merged

Mounted apps/ into ghost-dev container for pnpm 11#28210
9larsons merged 1 commit into
mainfrom
fix/dev-compose-mount-apps

Conversation

@9larsons
Copy link
Copy Markdown
Contributor

@9larsons 9larsons commented May 27, 2026

Follow-up to #28197 / #28205.

pnpm dev / ghost-dev failing to spin up after the pnpm 11 bump.

Why

The dev Dockerfile (docker/ghost-dev/Dockerfile) only stages ghost/{core,i18n,parse-email-address} package.jsons at build time. Compose then mounts ./ghost into the container at runtime, which exposes ghost/admin's workspace:* deps (e.g. @tryghost/admin-x-framework → lives in apps/admin-x-framework/). pnpm 10 was lenient about the missing workspace packages; pnpm 11 strict-validates the workspace graph and pnpm dev fails instead of being tolerated.

What changed

Added ./apps:/home/ghost/apps to the ghost-dev service's volume mounts in compose.dev.yaml. Same pattern as the existing ./ghost mount.

This makes only the package.jsons visible to the in-container workspace resolver. Host-side frontend dev servers (portal, comments-ui, admin-x-settings, …) continue running on the host under pnpm dev as before — this doesn't touch that path.

Longer-term

The cleaner fix is in the Dockerfile, not compose — stage all workspace package.jsons, or install with pnpm install --filter ghost.... The mount approach here is a fine immediate unblocker and consistent with the existing dev-mount pattern. A follow-up Linear can capture the Dockerfile cleanup separately.

The dev Dockerfile (docker/ghost-dev/Dockerfile) only stages
ghost/{core,i18n,parse-email-address} package.jsons at build time.
At runtime, compose mounts ./ghost into the container, which exposes
ghost/admin's `workspace:*` deps on apps/* (e.g.
@tryghost/admin-x-framework). pnpm 10 was lenient about the missing
workspace packages; pnpm 11 strict-validates the workspace graph and
`pnpm dev` blows up instead.

Mounting ./apps closes the gap with minimal change — same pattern as
the existing ./ghost mount. The host-side frontend dev servers under
pnpm dev still run on the host as before; this only makes the
package.jsons visible to the in-container workspace resolver.

Longer-term cleanup (staging all workspace package.jsons in the
Dockerfile, or installing with --filter ghost...) is a separate concern.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

Review Change Stack

Walkthrough

This PR updates the Docker Compose development configuration to mount the local ./apps directory into the ghost-dev container at /home/ghost/apps. The change includes explanatory comments documenting that this mount is necessary for Ghost admin and app packages to access pnpm workspace dependencies at runtime, with specific notes about compatibility across different pnpm versions.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: mounting the apps directory into the ghost-dev container to resolve pnpm 11 compatibility issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the problem (pnpm 11 strict workspace validation), the solution (mounting ./apps directory), and provides context about the change.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dev-compose-mount-apps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@9larsons 9larsons enabled auto-merge (squash) May 27, 2026 19:24
@9larsons 9larsons merged commit 75f8566 into main May 27, 2026
42 checks passed
@9larsons 9larsons deleted the fix/dev-compose-mount-apps branch May 27, 2026 19:43
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