Deploy: exdev sync 2026-08-13 14:48:13

This commit is contained in:
bkyungee
2026-08-13 14:48:14 +09:00
parent fb4179eaa5
commit 493b07ec30
4 changed files with 54 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
ssh -o BatchMode=yes -o ConnectTimeout=15 aidev@chatbot.exdev.co.kr 'bash -s' <<'EOSSH'
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/Applications/Docker.app/Contents/Resources/bin:$PATH"
echo "=== listening ports ==="
for p in 16000 16001 16002 27017 1521 28012 28013 8086 8083 8092 443; do
if lsof -iTCP:$p -sTCP:LISTEN >/dev/null 2>&1; then echo "UP :$p"; else echo "DOWN :$p"; fi
done
echo "=== docker ps ==="
docker ps --format '{{.Names}}\t{{.Status}}' 2>&1 | head -20
echo "=== docker compose plugin ==="
docker compose version 2>&1 | head -2
echo "=== public-ai timestamp ==="
ls -la /Users/aidev/dev/exAichatbot_agent/chatbotApp-chatbot2.0-agent/public-ai/index.html 2>/dev/null || echo "(missing)"
echo "=== HTTPS UI ==="
curl -s -o /dev/null -w 'https=%{http_code}\n' -m 10 https://chatbot.exdev.co.kr/chatbot/ai/ 2>&1
EOSSH
+3 -1
View File
@@ -103,7 +103,9 @@ REMOTE_PATH="${REMOTE_PATH%/}"
TAR_EXCLUDES=()
for pat in "${EXCLUDES[@]}"; do
TAR_EXCLUDES+=(--exclude "${pat}")
# tar 의 --exclude 는 'node_modules/' 처럼 슬래시로 끝나면 디렉터리에 매칭되지 않는다.
# (rsync 문법 그대로 넘기면 node_modules 가 통째로 전송돼 메모리 부족으로 죽는다)
TAR_EXCLUDES+=(--exclude "${pat%/}")
done
ssh -o BatchMode=yes "${HOST}" "mkdir -p '${REMOTE_PATH}'"
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/Applications/Docker.app/Contents/Resources/bin:/usr/bin:/bin:/usr/sbin:/sbin"
cd /Users/aidev/dev/exAichatbot_agent
git config core.autocrlf false
git config core.eol lf
python3 - << 'PYEOF'
import os
for d in ['kakaoChatbotSkill-chatbot2.0-agent','chatbotApi-chatbot2.0-agent']:
f = d+'/gradlew'
if os.path.exists(f):
data=open(f,'rb').read().replace(b'\r\n',b'\n').replace(b'\r',b'\n')
open(f,'wb').write(data)
os.chmod(f,0o755)
print('fixed:', f)
PYEOF
bash server-dev/start-all-server.sh --no-pull --no-push --skip-desktop
+16
View File
@@ -61,4 +61,20 @@ if [[ -d "${ROOT_DIR}/chatbotApp-chatbot2.0-agent/public-ai" ]]; then
"${EXDEV_SSH}:${REMOTE_WT}/chatbotApp-chatbot2.0-agent/public-ai/"
fi
# Windows 체크아웃(core.autocrlf)에서 넘어온 CRLF 는 macOS 에서
# "/bin/sh^M: bad interpreter" 로 죽는다. 전송 후 실행 진입점만 LF 로 강제한다.
log "원격 실행 스크립트 LF 정규화..."
ssh -o BatchMode=yes "${EXDEV_SSH}" "bash -s" <<EOSSH
set -e
WT="${REMOTE_WT}"
for f in \$(find "\${WT}" -name gradlew -not -path '*/node_modules/*' 2>/dev/null) \
\$(find "\${WT}" -name '*.sh' -not -path '*/node_modules/*' 2>/dev/null); do
if head -c 4000 "\$f" | grep -q \$'\r'; then
tr -d '\r' < "\$f" > "\$f.lf" && mv "\$f.lf" "\$f"
echo " LF 변환: \$f"
fi
chmod +x "\$f" 2>/dev/null || true
done
EOSSH
log "✅ submodule rsync 완료"