Deploy: GitHub submodule sync 2026-07-23 21:19:42

This commit is contained in:
Macbook
2026-07-23 21:19:42 +09:00
parent fa98eafa8f
commit 68ff71c1f7
5 changed files with 17 additions and 10 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ https://{$CHATBOT_DOMAIN:chatbot.exdev.co.kr} {
import tls_certs
# 업스트림 nginx 가 HTTP 로 absolute redirect 해서 http:// 로 떨어지지 않게 Caddy 에서 처리
redir / /chatbot/app/ 302
redir / /chatbot/ai/ 302
handle /agent/* {
reverse_proxy host.docker.internal:{$RAG_API_PORT:28012} {
+1 -1
View File
@@ -106,5 +106,5 @@ fi
COMMIT="$(git --git-dir="$GIT_DIR" rev-parse --short HEAD 2>/dev/null || echo unknown)"
log "======================================================"
log " 배포 완료 — $COMMIT"
log " UI: https://chatbot.exdev.co.kr/chatbot/app/"
log " UI: https://chatbot.exdev.co.kr/chatbot/ai/"
log "======================================================"
+8 -7
View File
@@ -126,7 +126,7 @@ wait_remote_deploy() {
EXDEV_SSH="${EXDEV_SSH}" PUBLIC_BASE_URL="${PUBLIC_BASE_URL}" "${wait_script}" || \
warn "원격 배포 대기 실패 — ssh ${EXDEV_SSH} tail /Volumes/ADATA/logs/deploy/exAichatbot_agent.log"
else
warn "wait-remote-deploy.sh 없음 — https://chatbot.exdev.co.kr/chatbot/app/ 수동 확인"
warn "wait-remote-deploy.sh 없음 — https://chatbot.exdev.co.kr/chatbot/ai/ 수동 확인"
fi
}
@@ -164,6 +164,7 @@ build_chatbot_app_for_deploy() {
)
bash "${APP_DIR}/build.sh"
[[ -f "${APP_DIR}/public/index.html" ]] || fail "chatbotApp public/ 빌드 실패"
[[ -f "${APP_DIR}/public-ai/index.html" ]] || fail "chatbotApp public-ai/ 빌드 실패"
}
deploy_from_local_mac() {
@@ -177,7 +178,7 @@ deploy_from_local_mac() {
wait_remote_deploy
log "=========================================="
log "원격 배포 요청 완료"
log " UI ${PUBLIC_BASE_URL}/chatbot/app/"
log " UI ${PUBLIC_BASE_URL}/chatbot/ai/"
log " 로그 ssh ${EXDEV_SSH} tail -f /Volumes/ADATA/logs/deploy/exAichatbot_agent.log"
log "=========================================="
exit 0
@@ -448,7 +449,7 @@ start_chatbot_app() {
export CHATBOT_API_HOST="host.docker.internal"
docker compose up -d --force-recreate
)
wait_http "http://127.0.0.1:${APP_PORT}/chatbot/app/" "chatbotApp UI" 60 || true
wait_http "http://127.0.0.1:${APP_PORT}/chatbot/ai/" "chatbotApp UI" 60 || true
}
start_caddy() {
@@ -466,7 +467,7 @@ start_caddy() {
export LEGACY_CERTS_DIR="${cert_dir}"
docker compose -f docker-compose.caddy.yml up -d --force-recreate
)
wait_http "https://chatbot.exdev.co.kr/chatbot/app/" "HTTPS UI" 30 || true
wait_http "https://chatbot.exdev.co.kr/chatbot/ai/" "HTTPS UI" 30 || true
}
verify_stack() {
@@ -475,7 +476,7 @@ verify_stack() {
curl -sf "http://127.0.0.1:${RAG_PORT}/health" | grep -q '"status"' || { log "❌ RAG health"; ok=false; }
wait_port "${WAS_PORT}" "chatbotApi" 5 || ok=false
wait_port "${SKILL_PORT}" "kakaoChatbotSkill" 5 || ok=false
curl -sf "http://127.0.0.1:${APP_PORT}/chatbot/app/" | grep -q 'data-chatbot-app' || { log "❌ chatbotApp UI"; ok=false; }
curl -sf "http://127.0.0.1:${APP_PORT}/chatbot/ai/" | grep -q 'data-chatbot-app="ai-mode"' || { log "❌ chatbotApp UI"; ok=false; }
if $ok; then log "✅ 전체 스택 정상"; return 0; fi
log "⚠️ 일부 서비스 미응답 — ${LOG_DIR}/ 확인"
return 1
@@ -522,7 +523,7 @@ if ! $SKIP_JAVA; then
"RAG_AGENT_CHAT_URL=http://127.0.0.1:${RAG_PORT}/agent/chat" \
"CHATBOT_API_BASE_URL=http://127.0.0.1:${WAS_PORT}/api/" \
"INTERNAL_TOOL_API_KEY=${INTERNAL_TOOL_API_KEY}" \
"CHATBOT_APP_URL=${PUBLIC_BASE_URL}/chatbot/app/"
"CHATBOT_APP_URL=${PUBLIC_BASE_URL}/chatbot/ai/"
wait_port "${WAS_PORT}" "chatbotApi" 240 || true
wait_port "${SKILL_PORT}" "kakaoChatbotSkill" 240 || true
@@ -533,7 +534,7 @@ start_caddy
log "=========================================="
log "기동 완료"
log " HTTPS UI ${PUBLIC_BASE_URL}/chatbot/app/"
log " HTTPS UI ${PUBLIC_BASE_URL}/chatbot/ai/"
log " RAG http://127.0.0.1:${RAG_PORT}/health"
log " Admin http://127.0.0.1:${ADMIN_PORT}/"
log " WAS http://127.0.0.1:${WAS_PORT}/"
+6
View File
@@ -46,4 +46,10 @@ if [[ -d "${ROOT_DIR}/chatbotApp-chatbot2.0-agent/public" ]]; then
"${EXDEV_SSH}:${REMOTE_WT}/chatbotApp-chatbot2.0-agent/public/"
fi
if [[ -d "${ROOT_DIR}/chatbotApp-chatbot2.0-agent/public-ai" ]]; then
log ">>> rsync chatbotApp/public-ai (AI 모드 빌드 산출물)"
rsync -az "${ROOT_DIR}/chatbotApp-chatbot2.0-agent/public-ai/" \
"${EXDEV_SSH}:${REMOTE_WT}/chatbotApp-chatbot2.0-agent/public-ai/"
fi
log "✅ submodule rsync 완료"
+1 -1
View File
@@ -4,7 +4,7 @@ set -euo pipefail
EXDEV_SSH="${EXDEV_SSH:-aidev@chatbot.exdev.co.kr}"
DEPLOY_LOG="${DEPLOY_LOG:-/Volumes/ADATA/logs/deploy/exAichatbot_agent.log}"
PUBLIC_URL="${PUBLIC_BASE_URL:-https://chatbot.exdev.co.kr}/chatbot/app/"
PUBLIC_URL="${PUBLIC_BASE_URL:-https://chatbot.exdev.co.kr}/chatbot/ai/"
MAX_WAIT="${DEPLOY_WAIT_SEC:-900}"
log() { echo "[wait-deploy] $*"; }