deploy.sh: extract as root, not the local uid

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
neil 2026-11-01 23:33:35 -08:00
parent 9d910eb147
commit 792d48553c

View file

@ -9,7 +9,7 @@ HOST=${HOST:?set HOST=root@<server>}
cd "$(dirname "$0")"
node --test tests/ >/dev/null || { echo "tests failed; not deploying" >&2; exit 1; }
tar -czf - --exclude=__pycache__ --exclude=data app compose.yml |
ssh "$HOST" 'set -e; mkdir -p /opt/tools && rm -rf /opt/tools/app && tar -xzf - -C /opt/tools'
ssh "$HOST" 'set -e; mkdir -p /opt/tools && rm -rf /opt/tools/app && tar --no-same-owner -xzf - -C /opt/tools'
ssh "$HOST" bash -s <<'REMOTE'
set -euo pipefail
cd /opt/tools