feat: Self-register Wild Central on startup
On startup, Wild Central registers its own domain (from config cloud.central.domain) as an HTTP service with itself. This creates the DNS entry, proxy route, and TLS cert needed to access the Central UI via its domain name. Registration is idempotent — safe on every restart. Skips silently if no domain is configured. Logs a warning if registration fails. Verified: after startup, /api/v1/services shows wild-central registered with domain central.payne.io. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
3
main.go
3
main.go
@@ -150,6 +150,9 @@ func main() {
|
||||
fmt.Sscanf(v, "%d", &port)
|
||||
}
|
||||
|
||||
// Self-register Wild Central's own domain (idempotent, skips if no domain configured)
|
||||
api.RegisterSelf(port)
|
||||
|
||||
addr := fmt.Sprintf("%s:%d", host, port)
|
||||
slog.Info("wild-central started", "addr", addr, "version", Version)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user