#!/bin/bash # Deploy UI changes to Gemini VPS VPS_IP="216.158.230.94" # Assuming root or the user has SSH config for this IP. # If you use a different user, please export VPS_USER="your-user" before running or edit this line. VPS_USER="${VPS_USER:-root}" REMOTE_PATH="/srv/containers/mtad-gemini" echo "Deploying to $VPS_USER@$VPS_IP..." echo "1. Syncing web directory..." # Sync web folder, excluding heavy/unnecessary files rsync -avz --exclude 'node_modules' --exclude '.next' --exclude '.git' ./web/ $VPS_USER@$VPS_IP:$REMOTE_PATH/web/ echo "2. Rebuilding frontend container..." # Rebuild and restart the frontend service ssh $VPS_USER@$VPS_IP "cd $REMOTE_PATH/backend && docker compose -f docker-compose.gemini.yml up -d --build frontend" echo "Deployment complete! Please refresh your browser."