diff --git a/apps/backend/internal/common/config/config.go b/apps/backend/internal/common/config/config.go index 19104efaa6..11390e73f9 100644 --- a/apps/backend/internal/common/config/config.go +++ b/apps/backend/internal/common/config/config.go @@ -193,6 +193,12 @@ func LoadWithPath(configPath string) (*Config, error) { v.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) v.AutomaticEnv() + // Explicit bindings for snake_case env vars (camelCase config keys) + // AutomaticEnv does not handle camelCase to SNAKE_CASE conversion, + // so we explicitly bind keys where env var naming differs from config key naming. + _ = v.BindEnv("agent.standalonePort", "KANDEV_AGENT_STANDALONE_PORT") + _ = v.BindEnv("agent.standaloneHost", "KANDEV_AGENT_STANDALONE_HOST") + // Configure config file v.SetConfigName("config") v.SetConfigType("yaml")