Files
seon 26061a474b chore: ai image b0ff118 (external responder), harness ed3d41d (26 min diagnose for external-*)
external-* 모델 참고 측정용. ai-agent 는 EXTERNAL_ADDR=:8090 리스너를 켜되 호스트의
127.0.0.1:8090 에만 매핑해 IAP SSH 터널로만 닿게 한다(응답이 곧 진단이므로 VPC 노출 금지).
ai.env 에 진단·턴 대기 시간(1500/1200초)을 명시. 하네스는 external- 모델의 /diagnose 를
26분 기다린다. VM 반영(make ai-sync / harness-sync)은 진행 중인 m1·Fable 배치가 끝난 뒤.
2026-10-16 09:10:07 +09:00

54 lines
2.2 KiB
YAML

# AI VM (10.20.0.12), experiment design 6.1: agent 8080 (/diagnose for the harness), rag-db (pgvector, internal),
# hitl 8081 (Discord gateway bot; /post and /escalate for the agent). Images: selfheal-lab-apps/ai (Cloud Build).
services:
agent:
image: asia-northeast1-docker.pkg.dev/cms-d-414903/selfheal-public/ai-agent:${AI_TAG}
container_name: agent
restart: always
env_file: /opt/selfheal/ai.env
environment:
RAG_DSN: "postgres://ai:${RAG_DB_PASSWORD}@rag-db:5432/ai?sslmode=disable"
HITL_URL: http://hitl:8081
OPENAI_KEY_FILE: /run/secrets/openai-api-key
ANTHROPIC_KEY_FILE: /run/secrets/anthropic-api-key
JEV_KEY_FILE: /run/secrets/typesafe-api-key
K8S_TOKEN_FILE: /run/secrets/k8s-token
K8S_CA_FILE: /run/secrets/k8s-ca.crt
PROMPT_DIR: /etc/ai/prompts
RUNBOOK_DIR: /etc/ai/runbooks
EXTERNAL_ADDR: ":8090" # external-* model ids: turns served to a client outside the VM (reference runs)
volumes:
- /opt/selfheal/ai/secrets:/run/secrets:ro
- ./prompts:/etc/ai/prompts:ro
- ./runbooks:/etc/ai/runbooks:ro
ports:
- "8080:8080"
- "127.0.0.1:8090:8090" # external responder: host-local only, reached through the IAP SSH tunnel (a reply is a diagnosis)
depends_on: [rag-db]
hitl:
image: asia-northeast1-docker.pkg.dev/cms-d-414903/selfheal-public/ai-hitl:${AI_TAG}
container_name: hitl
restart: always
env_file: /opt/selfheal/ai.env
environment:
RAG_DSN: "postgres://ai:${RAG_DB_PASSWORD}@rag-db:5432/ai?sslmode=disable"
DISCORD_TOKEN_FILE: /run/secrets/discord-bot-token
volumes:
- /opt/selfheal/ai/secrets:/run/secrets:ro
ports:
- "127.0.0.1:8081:8081" # agent reaches hitl on the compose network; host binding only for the local selfcheck
depends_on: [rag-db]
rag-db:
# pgvector 0.8.7 on PostgreSQL 16 (Docker Hub tag checked 2026-10-08); HNSW index up to 2000 dimensions (design 6.4)
image: pgvector/pgvector:0.8.7-pg16
container_name: rag-db
restart: always
environment:
POSTGRES_USER: ai
POSTGRES_PASSWORD: "${RAG_DB_PASSWORD}"
POSTGRES_DB: ai
volumes:
- rag-data:/var/lib/postgresql/data
volumes:
rag-data: {}