fix(api): fix getEnv stub and Dockerfile Go version for deployment readiness
The getEnv() function in server.go always returned the default value, preventing ACB_R2_ENDPOINT/ACB_B2_ENDPOINT from being read at runtime. Also updated Dockerfile from golang:1.24 to golang:1.25 to match go.mod. K8s manifests for acb-evolver and acb-api already exist in declarative-config/k8s/iad-acb/ai-code-battle/ (added Apr 21). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
9750d29618
commit
81940a1598
2 changed files with 5 additions and 4 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue