fix(deploy): load vite preview config for md.tkmind.cn host
LaunchAgent web startup must use vite-preview.config.mjs so preview allowedHosts includes md.tkmind.cn instead of blocking nginx requests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
export ADM_PORT="${ADM_PORT:-5174}"
|
||||
export ADM_WEB_HOST="${ADM_WEB_HOST:-0.0.0.0}"
|
||||
export ADM_DEV_BACKEND="${ADM_DEV_BACKEND:-http://127.0.0.1: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}"
|
||||
@@ -9,4 +11,8 @@ 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
|
||||
exec "${NODE_BIN}" ./node_modules/vite/bin/vite.js preview \
|
||||
--config scripts/vite-preview.config.mjs \
|
||||
--host 0.0.0.0 \
|
||||
--port "${ADM_PORT}" \
|
||||
--strictPort
|
||||
|
||||
Reference in New Issue
Block a user