Skip to content

--holds: map the side of hostshift.yaml the database holds - #15

Merged
oxyc merged 2 commits into
masterfrom
feat/db-holds
Nov 8, 2026
Merged

oxyc merged 2 commits into
masterfrom
feat/db-holds

Conversation

@oxyc

@oxyc oxyc commented Nov 8, 2026

Copy link
Copy Markdown
Member

A committed production-canonical hostshift.yaml describes the sites, not the database in front of a worktree. A worktree whose database was copied from a search-replaced parent holds each site's base, and a staging pull holds its alias. Mapped on the canonicals, WordPress then redirects every page to the host its rows name.

  • hostshift map/check/... --holds canonical|base|alias makes that origin each site's canonical and keeps the others as aliases. canonical is the default. alias refuses a site with none or several.
  • ddev hostshift init --holds X records the side as HOSTSHIFT_HOLDS in .ddev/.env, so check, the post-start hook and a later bare init agree. It hands the proxy a flat --from/--to map, which the published image already understands.
  • copy-db says to run init --holds base when a hostshift.yaml is present.
  • README: a section on --holds under production-canonical, and the flag in the reference.

Tests: TestMapHolds, and a 13-case --holds section in test/addon-command.sh. make test-addon and go test ./... pass; make test-integration (real DDEV) wasn't run.

🤖 Generated with Claude Code

generoi-deploy and others added 2 commits November 8, 2026 16:41
A committed production-canonical hostshift.yaml describes the sites, not the
database in front of the worktree. A copy-db of a search-replaced parent holds
each site's base, a staging pull its alias; mapped on the canonicals, WordPress
redirects every page to the host its rows name.

hostshift map/check/... --holds canonical|base|alias makes that origin each
site's canonical and keeps the others as aliases. ddev hostshift init --holds
records the side as HOSTSHIFT_HOLDS in .ddev/.env, so check, the post-start
hook and a later bare init agree, and hands the proxy a flat --from/--to map of
held origin against variant, which the published image already understands.
copy-db says which side to map when a hostshift.yaml is present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The flag picks a declared origin; nothing in it knows WordPress. Two
comments and the README section used it as the example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oxyc
oxyc merged commit 4bdba07 into master Nov 8, 2026
4 checks passed
@oxyc
oxyc deleted the feat/db-holds branch November 8, 2026 20:10
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.

2 participants