Deploy: GitHub submodule sync 2026-07-27 22:08:13
This commit is contained in:
+19
-3
@@ -8,7 +8,8 @@
|
||||
# ./git_fetch_all.sh --no-commit # fetch/merge만 (commit·push 생략)
|
||||
#
|
||||
# commit 시 운영 WAS/RAG 기본 주소(172.16.180.130)를 복원합니다.
|
||||
# exdev 로컬 주소(127.0.0.1 / host.docker.internal)는 .env·start 스크립트로만 사용합니다.
|
||||
# exdev 런타임 주소(127.0.0.1 / host.docker.internal)는 .env·start 스크립트·EXDEV_LOCAL 로만 사용하며
|
||||
# GitHub 에는 커밋하지 않습니다.
|
||||
#
|
||||
# 대상 (.gitmodules) — 모두 branch=chatbot2.0-agent (main 사용 안 함):
|
||||
# chatbotApi-chatbot2.0-agent
|
||||
@@ -111,6 +112,8 @@ restore_monorepo_overlays() {
|
||||
}
|
||||
|
||||
# GitHub push 전: 로컬(exdev) WAS 주소를 커밋하지 않고 운영 기본값(172.16.180.130) 유지
|
||||
# - 런타임(exdev): start-all-server.sh / .env / EXDEV_LOCAL=true → 127.0.0.1·host.docker.internal
|
||||
# - 커밋/push: 아래 복원으로 application.yml·env.template·chatbot_tool_client.py 기본값을 운영 IP로 고정
|
||||
PROD_WAS_API="http://172.16.180.130:8086/api"
|
||||
PROD_RAG_CHAT="http://172.16.180.130:28012/agent/chat"
|
||||
|
||||
@@ -127,19 +130,32 @@ restore_production_endpoints_before_commit() {
|
||||
perl -i -pe "s|RAG_AGENT_CHAT_URL:[^}]+}|RAG_AGENT_CHAT_URL:${PROD_RAG_CHAT}}|g" "${yml}"
|
||||
# trailing slash normalize for api default
|
||||
perl -i -pe "s|CHATBOT_API_BASE_URL:http://172\.16\.180\.130:8086/api/\}|CHATBOT_API_BASE_URL:http://172.16.180.130:8086/api/}|g" "${yml}"
|
||||
if grep -qE '127\.0\.0\.1:8086|host\.docker\.internal:8086|127\.0\.0\.1:28012' "${yml}"; then
|
||||
warn "${path}: application.yml 에 로컬 주소가 남아 있을 수 있음 — 확인 필요"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
exAiChatBot-chatbot2.0-agent)
|
||||
if [[ -f "${dir}/env.template" ]]; then
|
||||
perl -i -pe "s|^CHATBOT_API_BASE_URL=.*|CHATBOT_API_BASE_URL=${PROD_WAS_API}|" "${dir}/env.template"
|
||||
# EXDEV_LOCAL 은 커밋 템플릿에 넣지 않음 (server-dev 전용)
|
||||
perl -i -ne 'print unless /^EXDEV_LOCAL=/' "${dir}/env.template"
|
||||
fi
|
||||
if [[ -f "${dir}/env.example" ]]; then
|
||||
perl -i -pe "s|^CHATBOT_API_BASE_URL=.*|CHATBOT_API_BASE_URL=${PROD_WAS_API}|" "${dir}/env.example" 2>/dev/null || true
|
||||
perl -i -ne 'print unless /^EXDEV_LOCAL=/' "${dir}/env.example" 2>/dev/null || true
|
||||
fi
|
||||
if [[ -f "${dir}/scripts/agent/chatbot_tool_client.py" ]]; then
|
||||
perl -i -pe 's|"http://127\.0\.0\.1:8086/api"|"http://172.16.180.130:8086/api"|g' \
|
||||
# 운영 기본값(_PROD_WAS_API / legacy getenv default)만 복원.
|
||||
# _EXDEV_WAS_API(host.docker.internal) 는 exdev 차단용이라 건드리지 않는다.
|
||||
perl -i -pe 's|_PROD_WAS_API = "http://[^"]+"|_PROD_WAS_API = "http://172.16.180.130:8086/api"|g' \
|
||||
"${dir}/scripts/agent/chatbot_tool_client.py"
|
||||
perl -i -pe 's|"http://host\.docker\.internal:8086/api"|"http://172.16.180.130:8086/api"|g' \
|
||||
perl -i -pe 's|os\.getenv\("TOOL_API_BASE_URL", "http://127\.0\.0\.1:8086/api"\)|os.getenv("TOOL_API_BASE_URL", "http://172.16.180.130:8086/api")|g' \
|
||||
"${dir}/scripts/agent/chatbot_tool_client.py"
|
||||
perl -i -pe 's|os\.getenv\("TOOL_API_BASE_URL", "http://host\.docker\.internal:8086/api"\)|os.getenv("TOOL_API_BASE_URL", "http://172.16.180.130:8086/api")|g' \
|
||||
"${dir}/scripts/agent/chatbot_tool_client.py"
|
||||
# 구형 한 줄 기본값 형태도 운영 IP로 고정
|
||||
perl -i -pe 's|os\.getenv\("TOOL_API_BASE_URL", "http://[^"]+"\)|os.getenv("TOOL_API_BASE_URL", "http://172.16.180.130:8086/api")|g' \
|
||||
"${dir}/scripts/agent/chatbot_tool_client.py"
|
||||
fi
|
||||
# monorepo overlay compose 는 push 대상에서 제외 (로컬 exdev 전용)
|
||||
|
||||
Reference in New Issue
Block a user