From 12269051c404822a5808181c91debad9a3a4c9b3 Mon Sep 17 00:00:00 2001 From: Dennis Nemec Date: Wed, 2 Sep 2026 21:57:31 +0200 Subject: [PATCH] Deploy script: use scp/tar instead of rsync, strip macOS xattrs Co-Authored-By: Claude Fable 5.1 --- deploy/deploy-test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/deploy-test.sh b/deploy/deploy-test.sh index 6cdae25..687c453 100755 --- a/deploy/deploy-test.sh +++ b/deploy/deploy-test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Deploy a test instance to the Debian server (ssh alias "softvisor") on port 3333. # Builds a static x86_64 binary in Docker, ships it with the frontend, installs a -# systemd unit. Safe to re-run: keeps the existing .env (and therefore the DB/admin). +# systemd unit (scp/tar, the server has no rsync). Safe to re-run: keeps the existing .env (and therefore the DB/admin). set -euo pipefail cd "$(dirname "$0")/.." @@ -17,8 +17,9 @@ docker run --rm -v "$PWD/backend":/home/rust/src -v cargo-registry-musl:/root/.c echo "== upload" ssh "$HOST" "mkdir -p $DIR/data" -rsync -az backend/target/x86_64-unknown-linux-musl/release/monitoring-server "$HOST:$DIR/monitoring-server" -rsync -az --delete frontend/dist/ "$HOST:$DIR/dist/" +ssh "$HOST" "systemctl stop monitoring.service 2>/dev/null || true" +scp -q backend/target/x86_64-unknown-linux-musl/release/monitoring-server "$HOST:$DIR/monitoring-server" +COPYFILE_DISABLE=1 tar --no-xattrs -C frontend/dist -czf - . | ssh "$HOST" "rm -rf $DIR/dist && mkdir -p $DIR/dist && tar -C $DIR/dist -xzf -" echo "== configure (first run only)" if ! ssh "$HOST" "test -f $DIR/.env"; then