summaryrefslogtreecommitdiffstats
path: root/cmd/ship/list.go
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 /cmd/ship/list.go
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 'cmd/ship/list.go')
-rw-r--r--cmd/ship/list.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/ship/list.go b/cmd/ship/list.go
index a5b8df3..404ca68 100644
--- a/cmd/ship/list.go
+++ b/cmd/ship/list.go
@@ -43,7 +43,11 @@ func runList(cmd *cobra.Command, args []string) error {
43 if app.Type == "app" { 43 if app.Type == "app" {
44 port = fmt.Sprintf(":%d", app.Port) 44 port = fmt.Sprintf(":%d", app.Port)
45 } 45 }
46 fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", name, app.Type, app.Domain, port) 46 domain := app.Domain
47 if domain == "" {
48 domain = "-"
49 }
50 fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", name, app.Type, domain, port)
47 } 51 }
48 w.Flush() 52 w.Flush()
49 return nil 53 return nil