Skip to content

feat: S1 — contracts, configuration, and Compose foundation - #280

Draft
acburdine wants to merge 2 commits into
nextfrom
claude/s1-docker-compose-foundation-b1e9b9
Draft

feat: S1 — contracts, configuration, and Compose foundation#280
acburdine wants to merge 2 commits into
nextfrom
claude/s1-docker-compose-foundation-b1e9b9

Conversation

@acburdine

@acburdine acburdine commented Sep 3, 2026

Copy link
Copy Markdown
Member

Implements S1 from docs/ghost-cli-replacement.md (§2.1–2.4): the configuration/Compose foundation the rest of the stack builds on.

  • Application/operator config split (.env vs ghost.env), safe dotenv serialization that never sources a file, atomic private writes.
  • Parameterized DB connection, unique per-site service aliases, real readiness health checks, capped logs, lifecycle-specific restart policies.
  • local/production modes via COMPOSE_PROFILES; per-site analytics/activitypub.
  • Caddy route generation/validation with explicit production reload.
  • Bundle v1 encoding contract documented (docs/bundle-v1.md); exporter (S3) and legacy-install migration (S6) left to their steps.

The .ghost-docker.json reader/writer was deliberately deferred to S2 (#281), its first writer.

Base of the stack. Verified by the helper/mode-matrix suites and shellcheck.

🤖 Generated with Claude Code

ref https://linear.app/ghost/issue/PLA-413/phase-1-initial-scripts-library-testing-infrastructure
- add intitial scripts library + entrypoints
- split env into compose-level and ghost-level configuration
- switch to next ghost variant by default
- add node tests for e2e testing in ci
- add docs for ghost-cli replacement, configuration, and bundle format
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

@acburdine acburdine changed the title Implemented phase 1 of cli replacement plan feat: S1 — contracts, configuration, and Compose foundation Sep 3, 2026
Both surfaced by CI on Linux (the helpers were only run on macOS before).

- fs.sh: `stat -f '%Lp'` is BSD/macOS format syntax. On Linux `-f` is
  `--file-system`, which prints filesystem status for the file and *succeeds*,
  so the `|| stat -c` GNU fallback never ran and the filesystem blob became the
  chmod mode ("chmod: invalid mode"). Try GNU `-c` first (macOS rejects it
  cleanly and falls through to `-f`), fixing fs_stat_mode and _gd_stat_owner.
  This aborted every test that writes a config file through fs_atomic_write.

- scripts/config.sh, scripts/caddy.sh: `(($#)) && shift || true` trips SC2015
  on shellcheck 0.9 (Ubuntu's version); use `if (($#)); then shift; fi`.
- scripts/lib/caddy.sh: drop a useless `cat` (SC2002), redirect instead.

Verified with shellcheck 0.9.0 (CI's version) via koalaman/shellcheck:v0.9.0,
and the stat fix reproduced against ubuntu:24.04.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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