From 8583f3a605bd36fbeb448a3605a327fdd8ca6545 Mon Sep 17 00:00:00 2001 From: Eugene Blikh Date: Sat, 18 Jul 2026 22:16:37 +0300 Subject: [PATCH] doltsrht: pass full os.Args to server.New so -b binds the web listener getopt skips argv[0] as the program name, so os.Args[1:] made it swallow the first real flag (-b) and silently fall back to defaultWebAddr (localhost), leaving the web UI unreachable from Traefik. Match compare/upstream: pass os.Args. --- cmd/doltsrht/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/doltsrht/main.go b/cmd/doltsrht/main.go index 996151c27a7e8d5bd0dc31fd31fb9935da3d58ec..536d4fb86ed1b37192a83a302d10b7c6fcd7eb6c 100644 --- a/cmd/doltsrht/main.go +++ b/cmd/doltsrht/main.go @@ -136,7 +136,12 @@ func main() { // server.New parses -b/-d/-m/-p and runs crypto.InitCrypto (needs // [sr.ht]network-key + [webhooks]private-key; missing keys panic here). - srv := server.New(serviceName, defaultWebAddr, conf, os.Args[1:]) + // Pass the full os.Args: core-go's getopt skips argv[0] as the program name + // itself (like every upstream sourcehut daemon). Passing os.Args[1:] makes + // getopt swallow the first real flag (e.g. -b) as the program name, so the + // web bind silently falls back to defaultWebAddr (localhost) — unreachable + // from Traefik/other containers. + srv := server.New(serviceName, defaultWebAddr, conf, os.Args) cfg, err := resolveSettings(conf) if err != nil {