Files
backspace/deploy.sh
T
Jannis Braun 5fe43bc0c8 fix: DM close visibility flag, wire Remove Friend button, harden deploy script
- Redesign DM close as a visibility flag (closed column) instead of row deletion,
  so message broadcasts still reach users who closed a DM conversation
- Add broadcastDmMessage() helper that auto-resurfaces closed DMs when new messages arrive
- Wire Remove Friend button in DM welcome header with onClick handler and friend check
- Fix deploy.sh to cd to its own directory so rsync always runs from project root
2026-02-22 22:29:40 +01:00

30 lines
793 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
# Configuration
PI_IP="192.168.1.10"
PI_USER="youruser"
REMOTE_PATH="~/opencord"
# 0. Ensure remote directory exists
echo "📁 Preparing remote directory on Pi..."
ssh "$PI_USER@$PI_IP" "mkdir -p $REMOTE_PATH"
# 1. Sync files via rsync
echo "🚀 Syncing files to Pi..."
rsync -avz --delete \
--exclude='node_modules' \
--exclude='.git' \
--exclude='.env.local' \
--exclude='packages/*/node_modules' \
--exclude='packages/web/dist' \
--exclude='data' \
--exclude='.DS_Store' \
./ "$PI_USER@$PI_IP:$REMOTE_PATH"
# 2. Trigger Docker Compose directly on the Pi via SSH
echo "🚢 Triggering build and deploy on Pi hardware..."
ssh "$PI_USER@$PI_IP" "cd $REMOTE_PATH && docker compose up -d --build"
echo "✅ Deployment command sent to Pi!"