From a503fa9cbe99462d2274e52348830f12e2c687b2 Mon Sep 17 00:00:00 2001 From: john Date: Sun, 16 Aug 2026 08:57:00 +0800 Subject: [PATCH] fix(deploy): add LaunchAgent prod runner scripts for adm api and web Restore the missing run-memind-adm-*-prod.sh entrypoints expected by 103 LaunchAgents so admin services can restart cleanly after reboot. Co-authored-by: Cursor --- scripts/run-memind-adm-api-prod.sh | 8 ++++++++ scripts/run-memind-adm-web-prod.sh | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100755 scripts/run-memind-adm-api-prod.sh create mode 100755 scripts/run-memind-adm-web-prod.sh diff --git a/scripts/run-memind-adm-api-prod.sh b/scripts/run-memind-adm-api-prod.sh new file mode 100755 index 0000000..be7a236 --- /dev/null +++ b/scripts/run-memind-adm-api-prod.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +export ADM_API_PORT="${ADM_API_PORT:-8085}" +export NODE_BIN="${NODE_BIN:-/opt/homebrew/opt/node@24/bin/node}" +export PATH="/opt/homebrew/opt/node@24/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:${PATH}" +cd "${ROOT}" +exec "${NODE_BIN}" server/index.mjs diff --git a/scripts/run-memind-adm-web-prod.sh b/scripts/run-memind-adm-web-prod.sh new file mode 100755 index 0000000..7df08cf --- /dev/null +++ b/scripts/run-memind-adm-web-prod.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -euo pipefail +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +export ADM_PORT="${ADM_PORT:-5174}" +export NODE_BIN="${NODE_BIN:-/opt/homebrew/opt/node@24/bin/node}" +export PATH="/opt/homebrew/opt/node@24/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:${PATH}" +cd "${ROOT}" +if [[ ! -d dist ]]; then + echo "dist/ missing; run npm run build first" >&2 + exit 1 +fi +exec "${NODE_BIN}" ./node_modules/vite/bin/vite.js preview --host 0.0.0.0 --port "${ADM_PORT}" --strictPort