diff --git a/infrastructure/deployment/sync-to-prod.sh b/infrastructure/deployment/sync-to-prod.sh new file mode 100755 index 0000000..d14299a --- /dev/null +++ b/infrastructure/deployment/sync-to-prod.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +# Synka repo till prod-server utan att skriva över prod-specifik config. +# Körs från lokal/WSL-maskin mot cibello-prod. +set -euo pipefail + +LOCAL_DIR="${1:-/home/dator_ubuntujpb/.openclaw/workspace/cibello-work/cibello/}" +REMOTE_USER="${2:-ubuntu}" +REMOTE_HOST="${3:-cibello-prod}" +REMOTE_DIR="${4:-/opt/cibello-platform/}" + +echo "==> Synkar $LOCAL_DIR -> $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR" + +rsync -avz --delete \ + --exclude='.git/' \ + --exclude='node_modules/' \ + --exclude='dist/' \ + --exclude='.env' \ + --exclude='secrets/' \ + --exclude='certs/' \ + "$LOCAL_DIR" "$REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR" + +echo "==> Synk klar"