Moved WORKDIR to /var/lib/ghost and added community Docker target#27314
Moved WORKDIR to /var/lib/ghost and added community Docker target#27314
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #27314 +/- ##
==========================================
- Coverage 73.48% 73.42% -0.06%
==========================================
Files 1551 1552 +1
Lines 124558 124674 +116
Branches 15070 15073 +3
==========================================
+ Hits 91528 91545 +17
- Misses 32024 32103 +79
- Partials 1006 1026 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
963f2c3 to
c01ba9f
Compare
Context: the previous WORKDIR (/home/ghost) conflicted with the home directory convention. Moving to /var/lib/ghost follows the FHS standard for application state and aligns with the official Ghost Docker image path. The new `community` build target layers an entrypoint script and default config on top of the `full` target, seeding content from base_content into a named volume at startup — preparing for the future Docker Hub image.
c01ba9f to
f8d105d
Compare
|



refs BER-3398, BER-3399
The community Docker image (
docker-library/ghost) is maintained by external contributors, and updates consistently lag behind Ghost releases because they depend on community PRs throughdocker-library/official-images. We want to publish our owntryghost/ghostimage to Docker Hub that's a zero-change migration for the tens of thousands of self-hosters currently using the community image.To make that work, our production Dockerfile needs to match the conventions the community image established — primarily
WORKDIR /var/lib/ghost(so existing volume mounts and compose files just work) and content seeding on first boot (so a fresh named volume gets default themes and scaffolding). This PR makes those alignment changes and adds acommunitybuild target that layers the entrypoint, config, and VOLUME declaration on top of the existingfulltarget.The WORKDIR move from
/home/ghostto/var/lib/ghostalso cleaned up some dead code from the legacy Pro source-build era — unuseddefault/directory creation and theme copies that nothing references. Thelog/directory creation was moved toDockerfile.prowhere it belongs since Ghost itself writes logs tocontent/logs/, not a top-levellog/dir.The community target is not built or published in CI yet — that comes with BER-3400 when we're ready to push to Docker Hub. For now, it can be built locally with
docker build --target community.Merge Ghost-Moya#210 after this lands to align the Pro container and PR preview tooling with the new WORKDIR.