Repository navigation
✨ Added production site import, with the cutover documented (S5e) - #382
Merged
acburdine merged 5 commits intoOct 9, 2026
Merged
Conversation
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover Production Ghost-CLI sites could be exported but not imported, so main's scripts/migrate.sh was still the only way to move one. Since 2026-10-07 the cutover is documented rather than automated, so the importer only has to install the bundle as an ordinary production site. Stopping the source, its nginx and moving DNS are the operator's steps. A production site is served on the bundle's own domains unless options name others. A source URL that Caddy cannot serve as it is (plain http, a port or a path) is refused before anything is written, rather than served at a different address. On a domain other than the source's, the source's admin domain is dropped with a warning, so a rehearsal copy never claims the live admin domain. The importer does not strip mail, Mailgun or Stripe settings: a move needs them. The rehearsal docs say how to clear them in the copy. - manager/src/import.ts: accept production bundles, derive and check their domains, refuse portable production bundles and mode options that contradict the bundle. - manager/src/commands/install.ts: plan an import from the bundle and share the production checks; production imports' next steps name DNS and the source's staff accounts instead of creating an owner. - manager/test/import.test.ts: production imports, overrides, the admin domain rules and each new refusal. - docs/install.md: importing a production site, and moving one on the same server, to another host, and as a rehearsal copy. - docs/ghost-cli-replacement.md: leave only S5e's space and ownership work and its Linux acceptance runs. - README.md, help, docs/architecture.md, bundle-v1.md, configuration.md: import is no longer local-only.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover Unit tests stop at a scripted daemon, so nothing showed that a real Ghost-CLI production bundle imports, or that the documented same-server move works with nginx in the way. S12 must not merge next-docker into main before S5e's acceptance passes; a CI scenario keeps that true afterwards rather than relying on one manual run. The scenario installs a production source with Ghost-CLI's own MySQL, systemd and nginx setup and an admin domain, forces a failure by leaving nginx on port 80, checks the documented recovery, then performs the move and checks the site through Caddy with Caddy's test CA. It changes the host, so it refuses to run without GD_TEST_HOST_CHANGES=1. The cross-host move cannot be shown on one runner and stays a manual acceptance run. - tests/e2e/production-import.sh: the scenario. - .github/workflows/test.yml: a job that provides Ghost-CLI, nginx and MySQL on the runner and runs it. - README.md: list the script. - docs/ghost-cli-replacement.md: say what CI covers and what is manual.
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover Ghost-CLI 1.33.3's migrate-export failed on every standard production install: it copies content owned by the ghost user with sudo, and passed ui.sudo shell strings after ui.sudo had begun to accept only arrays. 1.33.4 fixes it (TryGhost/Ghost-CLI#2405), so it is the minimum for exporting, and what the end-to-end scenarios run. - tests/e2e/import.sh, .github/workflows/test.yml: run 1.33.4. - docs/install.md, docs/bundle-v1.md, pages/index.html: the minimum, and the exporter documentation at that tag. - manager/src/bundle/manifest.ts: the re-export advice names it.
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover The exporter refuses an existing output, even with --force, so the move's final export failed on the path the forced-failure export had already written. An operator meets the same refusal after a rehearsal, so the rehearsal steps now say to export to a new path. - tests/e2e/production-import.sh: export the final bundle to its own path. - docs/install.md: say the move's export goes to a new path.
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover The import and Caddy's verification of both domains passed, but signing in on the imported site answered 500. In production Ghost emails staff a code when they sign in from a new device, and the test site has no mail service, so sending the code throws. The source's config now turns the check off, which the import carries like any other setting, and the scenario checks it reached Ghost. A failed sign-in now prints Ghost's answer and logs. Operators meet the same check on a real site, so the docs say the first sign-in needs working mail. - tests/e2e/production-import.sh: the setting, its check, and the failure output. - docs/install.md: the first sign-in sends a code by email.
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.
ref https://linear.app/ghost/issue/PLA-479/s5e-production-import-and-cutover
install --importnow accepts bundles of production Ghost-CLI sites. The cutover itself is documented, not automated, as decided on 2026-10-07.What the import does
urlandadminUrl.--domain,--admin-domainand--emailoverride them.--domainthat would serve the site at that host's root, which changes its address.--domain/--admin-domain/--emailwith a local bundle,--localor--with mailpitwith a production bundle, and portable production bundles (the message points to the Ghost Admin route).Docs
docs/install.mdcovers importing a production site and moving one: on the same server (stop nginx yourself; how to recover if the import fails; disable nginx and theghost_*unit afterwards), to another host (DNS), and as a rehearsal copy. The rehearsal steps clearmail__*/bulkEmail__*fromghost.envand the Mailgun/Stripe settings and webhooks from the database. The setting names were checked against Ghost's schema.Testing
manager: format, lint, typecheck and unit tests pass (482).tests/e2e/production-import.shin CI (Production import on Linux). It installs a real Ghost-CLI production source (MySQL, systemd, nginx on 80, admin domain), then:check.GD_TEST_HOST_CHANGES=1. It hasn't run anywhere yet; this PR's CI is its first run.🤖 Generated with Claude Code