From a94b92f7fd05326c71ed93e798acfe2cb88f652c Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 27 Mar 2026 16:57:33 -0700 Subject: [PATCH] fix deployment: use config port, not $PORT The MCP agent sets $PORT from the route, but the Podman port mapping expects the container to listen on the config-defined port (3030). Remove $PORT override to avoid the mismatch. Also restore ports, network, and user fields in the service definition. Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy/kls-rift.toml | 2 +- main.go | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/deploy/kls-rift.toml b/deploy/kls-rift.toml index ca7c3e8..79c74d3 100644 --- a/deploy/kls-rift.toml +++ b/deploy/kls-rift.toml @@ -12,7 +12,7 @@ image = "mcr.svc.mcp.metacircular.net:8443/kls:v0.1.0" network = "mcpnet" user = "0:0" restart = "unless-stopped" -ports = ["127.0.0.1:48000:8000"] +ports = ["127.0.0.1:48000:3030", "100.95.252.120:48000:3030"] volumes = ["/srv/kls:/srv/kls"] cmd = ["-f", "/srv/kls/kls.conf"] diff --git a/main.go b/main.go index b3ae164..2b99b4e 100644 --- a/main.go +++ b/main.go @@ -6,7 +6,6 @@ import ( "log" "net" "net/http" - "os" "git.wntrmute.dev/kyle/goutils/config" "git.wntrmute.dev/kyle/goutils/die" @@ -30,15 +29,10 @@ func main() { srv := &server{db: db} http.Handle("/", srv) - var addr string - if port := os.Getenv("PORT"); port != "" { - addr = ":" + port - } else { - addr = net.JoinHostPort( - config.Get("HTTP_ADDR"), - config.GetDefault("HTTP_PORT", "8000"), - ) - } + addr := net.JoinHostPort( + config.Get("HTTP_ADDR"), + config.GetDefault("HTTP_PORT", "8000"), + ) log.Print("listening on ", addr) log.Fatal(http.ListenAndServe(addr, nil)) }