Validate providers and retain complete run debugging context

This commit is contained in:
2026-10-09 23:21:01 +01:00
parent f3d829bea5
commit 08b8647d5b
51 changed files with 1036 additions and 159 deletions
+12
View File
@@ -9,6 +9,7 @@ import (
"net/url"
"os"
"sort"
"strconv"
"time"
"git.a-wan.net/alan/pipelines/internal/protocol"
@@ -93,11 +94,22 @@ func systemStatus(r *http.Request, started time.Time, runErr error) *protocol.Sy
s.Server.Candidates = candidateURLs(s.Addresses, scheme, port, "/connect")
}
}
// Docker interface addresses are not the host's connection addresses. The
// installer publishes the detected host LAN IP and actual mapped host port.
if ip := net.ParseIP(os.Getenv("PIPELINES_HOST_IP")); ip != nil && !ip.IsLoopback() && !ip.IsUnspecified() {
if port, err := strconv.Atoi(os.Getenv("PIPELINES_PUBLIC_PORT")); err == nil && port > 0 && port <= 65535 {
s.Server.Port = strconv.Itoa(port)
s.Server.URL = (&url.URL{Scheme: "ws", Host: net.JoinHostPort(ip.String(), s.Server.Port), Path: "/connect"}).String()
s.Addresses = []protocol.NetworkAddress{{Interface: "LAN", IP: ip.String()}}
s.Server.Candidates = []string{s.Server.URL}
}
}
endpoints := notificationEndpoints()
if len(endpoints) == 0 {
return s
}
s.Topic = endpoints[0].Topic
s.NtfyUser = os.Getenv("PIPELINES_NTFY_READER")
s.Ntfy.Health = "not checked"
// Only the validated public base is returned. Publishing URL and tokens
// never leave the server, even on probe failure.