rename project from Opencord to Backspace in deployment config

- docker-compose: use external volume/network with backspace naming
- deploy.sh: add --remote/-r flag for off-network deploys, update remote path
- Dockerfile: update DB_PATH to backspace.db
This commit is contained in:
Jannis Braun
2026-03-01 01:22:03 +01:00
parent 773a03b1aa
commit aeb38a714a
3 changed files with 37 additions and 15 deletions
+21 -5
View File
@@ -2,13 +2,29 @@
cd "$(dirname "$0")"
# Configuration
PI_IP="192.168.1.10"
LOCAL_IP="192.168.1.10"
REMOTE_HOST="nova.ddns.net"
PI_USER="youruser"
REMOTE_PATH="~/opencord"
REMOTE_PATH="~/backspace"
# Host selection: --remote / -r | --local / -l | auto-detect (default)
if [[ "$1" == "--remote" || "$1" == "-r" ]]; then
PI_HOST="$REMOTE_HOST"
elif [[ "$1" == "--local" || "$1" == "-l" ]]; then
PI_HOST="$LOCAL_IP"
else
if ping -c1 -W2 "$LOCAL_IP" &>/dev/null; then
PI_HOST="$LOCAL_IP"
else
PI_HOST="$REMOTE_HOST"
fi
fi
echo "🎯 Target: $PI_USER@$PI_HOST"
# 0. Ensure remote directory exists
echo "📁 Preparing remote directory on Pi..."
ssh "$PI_USER@$PI_IP" "mkdir -p $REMOTE_PATH"
ssh "$PI_USER@$PI_HOST" "mkdir -p $REMOTE_PATH"
# 1. Sync files via rsync
echo "🚀 Syncing files to Pi..."
@@ -20,10 +36,10 @@ rsync -avz --delete \
--exclude='packages/web/dist' \
--exclude='data' \
--exclude='.DS_Store' \
./ "$PI_USER@$PI_IP:$REMOTE_PATH"
./ "$PI_USER@$PI_HOST:$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"
ssh "$PI_USER@$PI_HOST" "cd $REMOTE_PATH && docker compose up -d --build"
echo "✅ Deployment command sent to Pi!"