* fix(gateway): honor config bind settings and persist pairing Resolve docker-compose startup and restart friction by: - using config host/port defaults for gateway/daemon unless CLI flags are passed - persisting paired token hashes to config.toml on successful /pair - running container default command as 'zeroclaw gateway' (no hardcoded --host/--port overrides) - updating compose image/docs to zeroclaw-labs namespace - adding MODEL env fallback for default_model override and targeted regression tests * chore(ci): sync lockfile and restore rustfmt parity Update Cargo.lock to match Cargo.toml and format src/service/mod.rs so rust quality gates stop failing with unrelated baseline drift.
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
# ZeroClaw Docker Compose Example
|
|
#
|
|
# Quick start:
|
|
# 1. Copy this file and set your API key
|
|
# 2. Run: docker compose up -d
|
|
# 3. Access gateway at http://localhost:3000
|
|
#
|
|
# For more info: https://github.com/zeroclaw-labs/zeroclaw
|
|
|
|
services:
|
|
zeroclaw:
|
|
image: ghcr.io/zeroclaw-labs/zeroclaw:latest
|
|
# Or build locally:
|
|
# build: .
|
|
container_name: zeroclaw
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
# Required: Your LLM provider API key
|
|
- API_KEY=${API_KEY:-}
|
|
# Or use the prefixed version:
|
|
# - ZEROCLAW_API_KEY=${ZEROCLAW_API_KEY:-}
|
|
|
|
# Optional: LLM provider (default: openrouter)
|
|
# 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 (must match WORKDIR/HOME in Dockerfile)
|
|
- zeroclaw-data:/zeroclaw-data
|
|
|
|
ports:
|
|
# Gateway API port (override HOST_PORT if 3000 is taken)
|
|
- "${HOST_PORT:-3000}:3000"
|
|
|
|
# Resource limits
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2'
|
|
memory: 2G
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 512M
|
|
|
|
# Health check
|
|
healthcheck:
|
|
test: ["CMD", "zeroclaw", "doctor"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
zeroclaw-data:
|