summaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-01-24 16:55:52 -0800
committerbndw <ben@bdw.to>2026-01-24 16:55:52 -0800
commit8a3cff0dd7eb88cadb73a6df4e14f85450d63317 (patch)
tree461e3b7af3a71f92c8a916f2e4578a63e2d92f13 /internal
parent9c222e3fe49c6786c1719b6100564d413d7f8db6 (diff)
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
Diffstat (limited to 'internal')
-rw-r--r--internal/state/state.go5
1 files changed, 3 insertions, 2 deletions
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 {
15 15
16// Host represents deployment state for a single VPS 16// Host represents deployment state for a single VPS
17type Host struct { 17type Host struct {
18 NextPort int `json:"next_port"` 18 NextPort int `json:"next_port"`
19 Apps map[string]*App `json:"apps"` 19 BaseDomain string `json:"base_domain,omitempty"`
20 Apps map[string]*App `json:"apps"`
20} 21}
21 22
22// App represents a deployed application or static site 23// App represents a deployed application or static site