fix(deploy): pass NATS_HOST/NATS_PORT and autonomy gates through compose

The agents connect with NATS_HOST/NATS_PORT (NATS_URL is informational), but
docker-compose only forwarded NATS_URL. That was masked while system_config
carried the real host as a hardcoded default; after the secrets scrub the
default is localhost, so a deploy would have sent every NATS connection —
message bus, DispatchAgent, ExceptionAgent — to localhost.

Also forwards the autonomy gates (all default false) plus DISPATCH_REALERT_EVERY
and LLM_MODEL, so production behaviour is set in .env rather than by code
defaults. .env.example updated to match.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012AJLYcbTHCe45fyFnMfEin
This commit is contained in:
2026-09-22 16:43:51 +05:30
parent 008df49605
commit aa3bb35733
2 changed files with 20 additions and 1 deletions

View File

@@ -13,8 +13,12 @@ services:
container_name: doormile_agents
restart: unless-stopped
environment:
# NATS — event bus
# NATS — event bus. The agents connect with NATS_HOST/NATS_PORT (NATS_URL
# is informational), so both must be passed through or every connection
# falls back to localhost.
- NATS_URL=${NATS_URL}
- NATS_HOST=${NATS_HOST}
- NATS_PORT=${NATS_PORT}
- NATS_USER=${NATS_USER}
- NATS_PASSWORD=${NATS_PASSWORD}
# Redis — GEO queries, miler presence
@@ -33,6 +37,12 @@ services:
# AI layer — decision engine
- AI_LAYER_BASE_URL=${AI_LAYER_BASE_URL}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# Agent behaviour. Outward-facing actions stay gated unless explicitly enabled.
- DISPATCH_AGENT_AUTONOMOUS=${DISPATCH_AGENT_AUTONOMOUS:-false}
- EXPRESS_AGENT_AUTONOMOUS=${EXPRESS_AGENT_AUTONOMOUS:-false}
- EXCEPTION_AGENT_AUTONOMOUS=${EXCEPTION_AGENT_AUTONOMOUS:-false}
- DISPATCH_REALERT_EVERY=${DISPATCH_REALERT_EVERY:-100}
- LLM_MODEL=${LLM_MODEL:-claude-opus-4-8}
# Logging
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes: