From 8a3cff0dd7eb88cadb73a6df4e14f85450d63317 Mon Sep 17 00:00:00 2001 From: bndw Date: Sat, 24 Jan 2026 16:55:52 -0800 Subject: Add auto-generated subdomain feature When a base domain is configured on a host (e.g., apps.example.com), deployments automatically get a subdomain ({name}.apps.example.com). Custom --domain can still be provided to route both domains. - Add BaseDomain field to Host state - Add --base-domain flag to host init - Add 'ship host set-domain' command to update base domain - Update deploy flow to auto-generate subdomains - Fix error display (errors were being silently swallowed) - Remove placeholder email from Caddyfile template --- internal/state/state.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'internal/state') diff --git a/internal/state/state.go b/internal/state/state.go index b99e4ca..c6de34a 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -15,8 +15,9 @@ type State struct { // Host represents deployment state for a single VPS type Host struct { - NextPort int `json:"next_port"` - Apps map[string]*App `json:"apps"` + NextPort int `json:"next_port"` + BaseDomain string `json:"base_domain,omitempty"` + Apps map[string]*App `json:"apps"` } // App represents a deployed application or static site -- cgit v1.2.3