mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-19 00:15:05 +00:00
fix(docker): remove gateway config check, unnecessary anymore (#88)
This commit is contained in:
1 parent
1df0e518b6
commit
3f850bc713
1 file changed
-31
@@ -63,37 +63,6 @@ func runGateway() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Auto-detect: if no provider API key is configured, help the user.
|
||||
// Also trigger auto-onboard when config file doesn't exist (first run),
|
||||
// even if env vars provide API keys — DB seeding is required.
|
||||
_, cfgStatErr := os.Stat(cfgPath)
|
||||
configMissing := os.IsNotExist(cfgStatErr)
|
||||
if !cfg.HasAnyProvider() || configMissing {
|
||||
// Docker / CI: env vars provide API keys → non-interactive auto-onboard.
|
||||
if canAutoOnboard() {
|
||||
if runAutoOnboard(cfgPath) {
|
||||
cfg, _ = config.Load(cfgPath)
|
||||
} else {
|
||||
os.Exit(1)
|
||||
}
|
||||
} else if _, statErr := os.Stat(cfgPath); statErr == nil {
|
||||
// Config file exists — user already onboarded but forgot to source .env.local.
|
||||
envPath := filepath.Join(filepath.Dir(cfgPath), ".env.local")
|
||||
fmt.Println("No AI provider API key found. Did you forget to load your secrets?")
|
||||
fmt.Println()
|
||||
fmt.Printf(" source %s && ./goclaw\n", envPath)
|
||||
fmt.Println()
|
||||
fmt.Println("Or re-run the setup wizard: ./goclaw onboard")
|
||||
os.Exit(1)
|
||||
} else {
|
||||
// No config file at all → first time, redirect to onboard wizard.
|
||||
fmt.Println("No configuration found. Starting setup wizard...")
|
||||
fmt.Println()
|
||||
runOnboard()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Create core components
|
||||
msgBus := bus.New()
|
||||
|
||||
|
||||
Reference in new issue
Block a user