Files
AI_engine/docker-compose.yml
Suriyakumarvijayanayagam aa3bb35733 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
2026-09-22 16:43:51 +05:30

60 lines
1.9 KiB
YAML

version: "3.9"
networks:
frontend:
external: true
services:
doormile_agents:
build:
context: .
dockerfile: Dockerfile
image: doormile-agents:latest
container_name: doormile_agents
restart: unless-stopped
environment:
# 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
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_PASSWORD=${REDIS_PASSWORD}
# Postgres — booking history, outcome tracking
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
# Go backend — internal API calls
- GO_API_BASE_URL=${GO_API_BASE_URL}
- INTERNAL_API_KEY=${INTERNAL_API_KEY}
# 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:
- ./logs:/app/logs
networks:
- frontend
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
reservations:
cpus: "0.25"
memory: 128M