fix(deploy): set PATH and keep Node files root-owned (#6)

pct exec runs with PATH=/sbin:/bin:/usr/sbin:/usr/bin, so install.sh failed
right after installing Node to /usr/local/bin ("node: command not found");
update.sh had the same gap for pnpm. Both scripts now set PATH explicitly.

tar ran as root kept the Node tarball's uid, and cp -a carried it into
/usr/local (bin directory and npm included), handing whichever CT user has
that uid write access to code root executes. Extract with --no-same-owner;
a rerun repairs an affected CT.
This commit is contained in:
Florian Schmidt
2026-11-16 09:45:53 +01:00
parent df489fa147
commit 4fe7e4e376
4 changed files with 21 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ Node 22 security releases; unattended upgrades cover Debian packages only.
Build tools support node-pty compilation. Claude uses its native installer.
Local deployment regressions: `bash deploy/test/template-picker.test.sh` and
`bash deploy/test/ct-config.test.sh`. Existing CTs with a manual TUN mount entry
`bash deploy/test/ct-config.test.sh`, `bash deploy/test/install-script.test.sh`. Existing CTs with a manual TUN mount entry
(earlier Tailscale setups) keep it; no `dev0` is added on top.
The scripts require bash, use LF endings, and avoid early-consuming pipelines
under pipefail. Proxmox, systemd, Tailscale and SSH require deployment validation.