NODEDC_TASKMANAGER_CODEXAPI/docker-compose.local.yml

54 lines
2.0 KiB
YAML

services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-nodedc_agent_gateway}
POSTGRES_USER: ${POSTGRES_USER:-nodedc_agent_gateway}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-replace-with-local-postgres-password}
ports:
- "${POSTGRES_PORT:-54100}:5432"
volumes:
- agent-gateway-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
agent-gateway:
build:
context: .
init: true
environment:
NODE_ENV: ${NODE_ENV:-production}
HOST: 0.0.0.0
PORT: ${PORT:-4100}
LOG_LEVEL: ${LOG_LEVEL:-info}
DATABASE_URL: postgres://${POSTGRES_USER:-nodedc_agent_gateway}:${POSTGRES_PASSWORD:-replace-with-local-postgres-password}@postgres:5432/${POSTGRES_DB:-nodedc_agent_gateway}
NODEDC_AGENT_GATEWAY_PUBLIC_URL: ${NODEDC_AGENT_GATEWAY_PUBLIC_URL:-http://localhost:4100}
NODEDC_AGENT_GATEWAY_INTERNAL_TOKEN: ${NODEDC_AGENT_GATEWAY_INTERNAL_TOKEN:-local-dev-codex-agent-gateway-token-change-me}
NODEDC_LAUNCHER_INTERNAL_URL: ${NODEDC_LAUNCHER_INTERNAL_URL:-http://launcher.local.nodedc}
NODEDC_TASKER_INTERNAL_URL: ${NODEDC_TASKER_INTERNAL_URL:-http://task.local.nodedc}
NODEDC_INTERNAL_ACCESS_TOKEN: ${NODEDC_INTERNAL_ACCESS_TOKEN:-local-dev-nodedc-internal-token-change-me}
depends_on:
postgres:
condition: service_healthy
extra_hosts:
- "auth.local.nodedc:host-gateway"
- "launcher.local.nodedc:host-gateway"
- "task.local.nodedc:host-gateway"
ports:
- "${PORT:-4100}:${PORT:-4100}"
healthcheck:
test:
[
"CMD-SHELL",
"node -e \"fetch('http://127.0.0.1:' + (process.env.PORT || 4100) + '/readyz').then(async r => { const b = await r.json(); process.exit(r.ok && b.ok ? 0 : 1); }).catch(() => process.exit(1))\"",
]
interval: 10s
timeout: 5s
retries: 10
volumes:
agent-gateway-postgres: