1
0
mirror of git://f0xx.org/ac/ac-scripts synced 2026-07-29 04:18:19 +03:00

full_deployment: targeted sync of critical files only (avoid slow full NFS rsync)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Anton Afanasyeu
2026-07-04 11:25:01 +02:00
parent 0544d18d91
commit 80fe8744f2

View File

@@ -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"
}