fix(config): apply env overrides at runtime and fix Docker compose defaults (#279)

- Call apply_env_overrides() after Config::load_or_init() in main.rs so
  environment variables (API_KEY, PROVIDER, ZEROCLAW_GATEWAY_PORT, etc.)
  are actually applied at runtime, not just in tests
- Add ZEROCLAW_ALLOW_PUBLIC_BIND env var support for gateway bind policy
- Fix docker-compose.yml: correct volume path (/zeroclaw-data not /data),
  add ZEROCLAW_ALLOW_PUBLIC_BIND=true for container networking, make host
  port configurable via HOST_PORT env var
- Add docker-compose.override.yml to .gitignore for local dev overrides
This commit is contained in:
Vernon Stinebaker 2026-02-16 15:12:49 +08:00 committed by GitHub
parent ebdcee3a5d
commit d5e8fc1652
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 5 deletions

View file

@ -25,16 +25,19 @@ services:
# Options: openrouter, openai, anthropic, ollama
- PROVIDER=${PROVIDER:-openrouter}
# Allow public bind inside Docker (required for container networking)
- ZEROCLAW_ALLOW_PUBLIC_BIND=true
# Optional: Model override
# - ZEROCLAW_MODEL=anthropic/claude-sonnet-4-20250514
volumes:
# Persist workspace and config
- zeroclaw-data:/data
# Persist workspace and config (must match WORKDIR/HOME in Dockerfile)
- zeroclaw-data:/zeroclaw-data
ports:
# Gateway API port
- "3000:3000"
# Gateway API port (override HOST_PORT if 3000 is taken)
- "${HOST_PORT:-3000}:3000"
# Health check
healthcheck: