From e50b6f7d6d318d08e5573661aa69df7c760cc328 Mon Sep 17 00:00:00 2001 From: jsahn Date: Tue, 7 Jul 2026 14:12:08 +0900 Subject: [PATCH] fix: use internal container URL for api_base (join runner to backend network) localhost:8800 fails because act_runner job containers run in their own network namespace. Point api_base at the backend container on the shared docker network (http://agent-backend:8000). Requires the runner's config.yaml container.network to be set to the backend's docker network. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/run-agent.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/run-agent.yml b/.gitea/workflows/run-agent.yml index 0db9b266..8a2c4e22 100644 --- a/.gitea/workflows/run-agent.yml +++ b/.gitea/workflows/run-agent.yml @@ -10,12 +10,15 @@ # # 인증 (중요): # 공개 URL(https://legalpoc.eroomai.com)은 Google OAuth 프록시(auth.eroomai.com) -# 뒤에 있어서 CI 에서는 302 로 로그인 페이지로 튕긴다. 그래서 api_base 기본값을 -# 프록시를 거치지 않는 내부 주소(http://localhost:8800)로 둔다. -# 내부 백엔드는 /api 접두사 없이 루트로 API 를 제공한다(/upload-agent, /sse/agent/...). -# ※ 러너 job 이 컨테이너 안에서 돌아 localhost 로 호스트에 못 닿으면 -# api_base 를 http://host.docker.internal:8800 또는 -# http://eroom-server.tailabbfd5.ts.net:8800 로 바꿔서 실행할 것. +# 뒤에 있어서 CI 에서는 302 로 로그인 페이지로 튕긴다. localhost:8800 도 job 이 +# 컨테이너 안에서 돌면 컨테이너 자신을 가리켜 못 닿는다. +# → 해결: act_runner 의 job 컨테이너를 AgentBackend 와 같은 도커 네트워크에 붙이고 +# 내부 컨테이너 주소로 직접 호출한다(프록시 우회). 내부 백엔드는 /api 접두사 없이 +# 루트로 API 를 제공한다(/upload-agent, /sse/agent/...). +# 러너 설정 (서버, /opt/gitea-runner-scale/): +# config.yaml 의 container.network 를 백엔드 네트워크 이름으로 지정 +# (docker network ls 로 확인, 보통 agentbackend_agent-network). +# 그러면 api_base = http://agent-backend:8000 (container_name, 내부 포트 8000). # # 실행 흐름 (SKILL.md §0.6 경로 A): # upload-agent 등록 → SSE start → stage_complete 자동 confirm → execution_complete @@ -61,9 +64,9 @@ on: default: '0' type: string api_base: - description: 'AgentBackend API base URL (내부 주소, /api 접두사 없음)' + description: 'AgentBackend API base URL (내부 컨테이너 주소, /api 접두사 없음)' required: false - default: 'http://localhost:8800' + default: 'http://agent-backend:8000' type: string max_runtime_seconds: description: '총 실행 시간 상한(초). Gitea/act_runner 3h 상한보다 짧게'