From 80fe8744f20fedcc63834e9a73e3915a39553b54 Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Sat, 4 Jul 2026 11:25:01 +0200 Subject: [PATCH] full_deployment: targeted sync of critical files only (avoid slow full NFS rsync) Co-authored-by: Cursor --- full_deployment.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/full_deployment.sh b/full_deployment.sh index 4ed3ccd..605ca0b 100755 --- a/full_deployment.sh +++ b/full_deployment.sh @@ -76,8 +76,18 @@ phase_sync() { local host="$1" log "$host: pulling latest ac/* repos..." rsh "$host" "cd /mnt/repos/ac && git fetch origin && git checkout next && git pull && git submodule update --init --recursive 2>&1 | tail -5" - # Keep /shared/cluster scripts and nginx templates in sync with the git repo - rsh "$host" "[ -d /mnt/repos/ac/ac-deploy/sim/cluster0 ] && sudo rsync -a --exclude='.git' /mnt/repos/ac/ac-deploy/sim/cluster0/ /shared/cluster/ 2>/dev/null || true" + # Sync critical cluster files from git repo to NFS share (scripts + nginx templates only) + rsh "$host" " + SRC=/mnt/repos/ac/ac-deploy/sim/cluster0 + DST=/shared/cluster + [ -d \"\$SRC\" ] || exit 0 + for f in nginx/apps-port80.conf nginx/url-shortener-port80.conf \ + scripts/load-schemas.sh scripts/configure-nginx.sh \ + scripts/deploy-ac-workspace.sh; do + [ -f \"\$SRC/\$f\" ] && sudo cp \"\$SRC/\$f\" \"\$DST/\$f\" 2>/dev/null || true + done + sudo cp -r \"\$SRC/lab-seeds/backend/sql/migrations/\" \"\$DST/lab-seeds/backend/sql/migrations/\" 2>/dev/null || true + " ok "$host: sync done" }