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 <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-16 08:57:00 +08:00
parent 66dd288015
commit a503fa9cbe
2 changed files with 20 additions and 0 deletions
+8
View File
@@ -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
+12
View File
@@ -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