Files
memind/scripts/deploy-wechat-mp-prod.sh
T
john 91d5c7a1fd chore(infra): update Studio/103 host IP to 114.85.107.50
Replace all references to the previous Portal host 180.159.29.143 with
114.85.107.50 across release scripts, safety gates, runbooks, and docs.

Also add scripts/push-wechat-news-morning-draft-now.mjs for direct draft
push without waiting on the worker poll interval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:49:09 +08:00

29 lines
854 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
HOST="${MEMIND_PROD_HOST:-john@114.85.107.50}"
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"