diff --git a/cmd/acb-api/Dockerfile b/cmd/acb-api/Dockerfile index 8d04bc4..b6d0ef6 100644 --- a/cmd/acb-api/Dockerfile +++ b/cmd/acb-api/Dockerfile @@ -3,7 +3,7 @@ # and Glicko-2 rating updates. Connects to PostgreSQL and Valkey. # Build stage -FROM golang:1.24-alpine AS builder +FROM golang:1.25-alpine AS builder WORKDIR /build diff --git a/cmd/acb-api/server.go b/cmd/acb-api/server.go index aeeec94..f047a09 100644 --- a/cmd/acb-api/server.go +++ b/cmd/acb-api/server.go @@ -8,6 +8,7 @@ import ( "io" "log" "net/http" + "os" "strconv" "strings" "time" @@ -1137,9 +1138,9 @@ func (s *Server) authenticateWorker(r *http.Request) bool { return parts[1] == s.cfg.WorkerAPIKey } -// getEnv gets an environment variable with a default value func getEnv(key, defaultValue string) string { - // This function is a simple helper - in production use the one from config.go - // For now, inline the logic + if v := os.Getenv(key); v != "" { + return v + } return defaultValue }