docs(stack): custom-domains runbook (add a client custom domain via Cloudflare-for-SaaS) - #179
Open
samo-agent wants to merge 1 commit into
Open
docs(stack): custom-domains runbook (add a client custom domain via Cloudflare-for-SaaS)#179samo-agent wants to merge 1 commit into
samo-agent wants to merge 1 commit into
Conversation
Adds docs/stack/custom-domains.md — end-to-end operator runbook for attaching a client custom domain via CF-for-SaaS Custom Hostnames. Covers prerequisites, exact commands, the three required customer DNS records, verification, the worked www.samorev.xyz example, known gotchas (apex domains, grey-cloud, validation staleness, missing CP vhost), and the full runtime routing chain. Facts verified against src/commands/domain.ts, src/env/script.ts, and src/dns/cloudflare.ts. Also adds index row in docs/stack/README.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
docs/stack/custom-domains.md— the missing end-to-end operator runbook for attaching a client FQDN via CF-for-SaaS Custom Hostnamesdocs/stack/README.mdpointing to the new fileWhat the doc covers
CLOUDFLARE_SAMOTEAMtoken (scope, zone, entitlement),SAMOHOST_SAAS_ZONE_IDoptional fallback,cname.samo.teamorigin, app registration gate, CLI-must-run-on-CP requirementsearch,add,check,list,rmdomain addflow (CF Custom Hostname creation → app VM vhost → CP vhost → state persist → DNS instructions)cname.samo.team, DCV delegation CNAME_acme-challenge.<fqdn>→ CF hash, ownership TXT) — called out in a tabledomain check(exit 0 only when both statuses areactive)www.samorev.xyz(PR feat(domain): MVP CLI for client custom domains (add/check/list/rm/search) #114, live)Fact-verification notes
All facts below were read from the code, not from the brief:
CLOUDFLARE_SAMOTEAMis the token var namesrc/commands/domain.ts:863SAMOHOST_SAAS_ZONE_ID/SAMOHOST_SAAS_ZONEoptional varssrc/commands/domain.ts:864-865SAMOHOST_CUSTOM_HOSTNAME_TARGETdefault =cname.samo.teamsrc/commands/domain.ts:57,292domain adddegrades cleanly when token absent (warn, still writes vhost)src/commands/domain.ts:60-65,305-307tls internal+header_up Host <httpHost>src/env/script.ts:2989-2999src/env/script.ts:2801domain checkexit 0 only when bothhostname_statusANDssl_statusareactivesrc/commands/domain.ts:475dcv_delegation_recordsstructure (cname+cname_target)src/dns/cloudflare.ts:222ownership_verificationstructure (type,name,value)src/dns/cloudflare.ts:224domain addnote about--dcv httpstalling on HTTPS-only CPsrc/cli.ts:413-414One brief fact corrected: the brief stated
--dcv txt|httpas the flag format; the actual CLI help and parser use--dcv txt/--dcv http(space, not pipe — pipe is just help-text notation). No impact on the doc (notation matches CLI help).Not included
domain recheckcommand exists in the codebase; the known-gap note documents this explicitly.🤖 Generated with Claude Code