platform
Build and Publish / BuildAndDeployArm64 (push) Failing after 6s
Build and Publish / BuildAndDeployAmd64 (push) Failing after 4s

This commit is contained in:
2026-06-27 21:46:55 +02:00
parent 528c59bfd3
commit 7db0d236c7
7 changed files with 25 additions and 56 deletions
+3 -10
View File
@@ -19,6 +19,7 @@ import (
"git.k6n.net/mats/go-cart-actor/pkg/profile"
"git.k6n.net/mats/go-cart-actor/pkg/proxy"
"git.k6n.net/mats/go-cart-actor/pkg/telemetry"
"git.k6n.net/mats/platform/config"
"github.com/redis/go-redis/v9"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)
@@ -88,18 +89,10 @@ func loadUCPProfileSigner() *ucp.SigningConfig {
return cfg
}
// getEnv returns the value of the environment variable named by key, or def if unset/empty.
func getEnv(key, def string) string {
if v := os.Getenv(key); v != "" {
return v
}
return def
}
func main() {
reg := profile.NewProfileMutationRegistry()
profileDir := getEnv("PROFILE_DIR", "data/profiles")
profileDir := config.EnvString("PROFILE_DIR", "data/profiles")
if err := os.MkdirAll(profileDir, 0755); err != nil {
log.Printf("warning: could not create profile data directory %s: %v", profileDir, err)
}
@@ -214,7 +207,7 @@ func main() {
})
srv := &http.Server{
Addr: getEnv("PROFILE_ADDR", ":8080"),
Addr: config.EnvString("PROFILE_ADDR", ":8080"),
BaseContext: func(net.Listener) context.Context { return ctx },
ReadTimeout: 10 * time.Second,
WriteTimeout: 20 * time.Second,