Persist npm path for user services

This commit is contained in:
武阳
2026-05-07 13:00:53 +08:00
parent b72eae5da7
commit cd4e73c159
3 changed files with 37 additions and 1 deletions
+2
View File
@@ -165,6 +165,8 @@ Python 后端依赖由部署脚本安装到项目根目录 `.venv`。
前端依赖由部署脚本在 `frontend/app` 下执行 `npm ci` 安装,并执行 `npm run build`
部署脚本会把当前 shell 中可用的 `npm` 路径写入 `.env.deploy`,避免用户级 systemd 服务启动时读取不到 zsh/nvm 环境。
默认部署使用用户级 systemd,不需要 sudo。若机器要求服务在用户退出 SSH 后仍保持运行,可由管理员额外执行:
```bash