From a48a911cc29ec7571ac07008bea3801745d5c00d Mon Sep 17 00:00:00 2001 From: Clawd Date: Mon, 16 Feb 2026 17:02:36 -0800 Subject: Add --domain flag support to v2 deploy Allows specifying a custom domain instead of using the auto-generated subdomain pattern. Usage: ship . --domain bdw.to --- cmd/ship/deploy_v2.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cmd/ship/deploy_v2.go') diff --git a/cmd/ship/deploy_v2.go b/cmd/ship/deploy_v2.go index af4e3a7..b636709 100644 --- a/cmd/ship/deploy_v2.go +++ b/cmd/ship/deploy_v2.go @@ -67,8 +67,13 @@ func deployV2(path string, opts deployV2Options) { name = generateName() } - // Build URL - url := fmt.Sprintf("https://%s.%s", name, hostConfig.BaseDomain) + // Build URL: use custom domain if provided, otherwise use subdomain + var url string + if opts.Domain != "" { + url = fmt.Sprintf("https://%s", opts.Domain) + } else { + url = fmt.Sprintf("https://%s.%s", name, hostConfig.BaseDomain) + } // Build deploy context ctx := &deployContext{ @@ -140,6 +145,7 @@ func deployV2(path string, opts deployV2Options) { type deployV2Options struct { Name string Host string + Domain string Health string TTL string Env []string -- cgit v1.2.3