Files
memind/scripts/deploy-wechat-mp-prod.sh
T
john b09b269199 chore(infra): migrate 103 production host IP to 180.159.29.143
Update scripts, docs, nginx configs, and release-gate safety checks after the Studio server public IP changed from 58.38.22.103.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 12:28:19 +08:00

29 lines
855 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
HOST="${MEMIND_PROD_HOST:-john@180.159.29.143}"
REMOTE_ROOT="${MEMIND_PROD_ROOT:-/Users/john/Project/Memind}"
BUNDLE=".runtime/portal/wechat-mp.bundle.mjs"
echo "[deploy-wechat-mp] build bundle"
node scripts/build-wechat-mp-runtime.mjs
if [[ ! -f "${BUNDLE}" ]]; then
echo "missing bundle: ${BUNDLE}" >&2
exit 1
fi
echo "[deploy-wechat-mp] upload ${BUNDLE} -> ${HOST}:${REMOTE_ROOT}/wechat-mp.bundle.mjs"
scp "${BUNDLE}" "${HOST}:${REMOTE_ROOT}/wechat-mp.bundle.mjs"
echo "[deploy-wechat-mp] restart portal"
ssh "${HOST}" 'launchctl kickstart -k "gui/$(id -u)/cn.tkmind.memind-portal"'
echo "[deploy-wechat-mp] health check"
ssh "${HOST}" 'curl -s -o /dev/null -w "portal=%{http_code}\n" http://127.0.0.1:8081/api/status'
echo "[deploy-wechat-mp] done"