fix(deploy): run next start from repo root on VPS

Standalone traced node_modules were incomplete after partial sync;
use npm start with production deps at INSTALL_DIR for reliable boots.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Андрей Бобырев
2026-05-24 22:55:53 +03:00
parent 315aa2d033
commit eec5c214e9
2 changed files with 13 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
# Domain Scanner — one-command uninstall
set -euo pipefail
INSTALL_DIR="${DOMAIN_SCANNER_INSTALL_DIR:-/opt/domain_web}"
INSTALL_DIR="${DOMAIN_SCANNER_INSTALL_DIR:-/opt/domain-scanner}"
SERVICE_NAME="domain-scanner"
NGINX_SITE="domain-scanner"
LEGACY_SERVICE="geoexport-site"
@@ -27,6 +27,13 @@ stop_docker() {
fi
}
stop_app() {
systemctl stop "${SERVICE_NAME}.service" 2>/dev/null || true
systemctl disable "${SERVICE_NAME}.service" 2>/dev/null || true
rm -f "/etc/systemd/system/${SERVICE_NAME}.service"
systemctl daemon-reload
}
stop_legacy() {
systemctl stop "${LEGACY_SERVICE}.service" 2>/dev/null || true
systemctl disable "${LEGACY_SERVICE}.service" 2>/dev/null || true
@@ -51,6 +58,7 @@ remove_files() {
}
need_root
stop_app
stop_docker
stop_legacy
remove_nginx