Mounted apps/ into ghost-dev container for pnpm 11#28210
Merged
Conversation
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.
Contributor
WalkthroughThis PR updates the Docker Compose development configuration to mount the local 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #28197 / #28205.
pnpm dev/ghost-devfailing to spin up after the pnpm 11 bump.Why
The dev Dockerfile (
docker/ghost-dev/Dockerfile) only stagesghost/{core,i18n,parse-email-address}package.jsons at build time. Compose then mounts./ghostinto the container at runtime, which exposesghost/admin'sworkspace:*deps (e.g.@tryghost/admin-x-framework→ lives inapps/admin-x-framework/). pnpm 10 was lenient about the missing workspace packages; pnpm 11 strict-validates the workspace graph andpnpm devfails instead of being tolerated.What changed
Added
./apps:/home/ghost/appsto theghost-devservice's volume mounts incompose.dev.yaml. Same pattern as the existing./ghostmount.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 underpnpm devas 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 withpnpm 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.