Refactor: Deploy-Skripte bereinigt (Next.js/deploy/-Referenzen entfernt)

4 veraltete Skripte durch 2 einfache ersetzt: deploy-test.sh + deploy-pi.sh

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 19:43:00 +02:00
parent 8dc4e8d698
commit b941c5db51
6 changed files with 10 additions and 102 deletions
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# Deploy auf Raspberry Pi (10.66.120.3)
set -e
rsync -a backend/ root@10.66.120.3:/opt/zfs-manager/backend/
ssh root@10.66.120.3 'systemctl restart zfs-manager-backend && systemctl is-active zfs-manager-backend'
Executable
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
# Deploy auf Test-Container (192.168.1.179)
set -e
rsync -a backend/ root@192.168.1.179:/opt/zmb-webui/backend/
ssh root@192.168.1.179 'systemctl restart zmb-webui-backend && systemctl is-active zmb-webui-backend'
-45
View File
@@ -1,45 +0,0 @@
#!/bin/bash
# Deploy ZMB Webui to target system
# Usage: ./deploy.sh [target] [--pull]
# Example: ./deploy.sh 192.168.1.179
# Example: ./deploy.sh 192.168.1.179 --pull (pull from git first)
TARGET="${1:-192.168.1.179}"
PULL="${2:-}"
set -e
if [ "$PULL" == "--pull" ]; then
echo "📦 Pulling from git..."
git pull origin master
fi
echo "🔨 Building frontend..."
cd frontend
rm -rf .next out
npm run build > /dev/null 2>&1
cd ..
echo "📤 Deploying to $TARGET..."
# Deploy backend
echo " → Backend..."
rsync -avz --delete backend/ root@$TARGET:/opt/zmb-webui/backend/ \
--exclude venv --exclude __pycache__ --exclude "*.pyc" > /dev/null
# Deploy frontend
echo " → Frontend..."
rsync -avz --delete frontend/out/ root@$TARGET:/opt/zmb-webui/frontend/ > /dev/null
# Restart services
echo "🔄 Restarting services..."
ssh root@$TARGET bash << 'EOF'
systemctl restart zmb-webui-backend
sleep 1
systemctl restart nginx
sleep 1
echo "✓ Services restarted"
EOF
echo "✅ Deployment complete!"
echo " Access: https://$TARGET:8090"
-51
View File
@@ -1,51 +0,0 @@
#!/bin/bash
# ZMB Webui Updater für 192.168.1.179
# Buildet Frontend neu und deployt alles
set -e
CONTAINER="192.168.1.179"
BACKEND_PATH="/opt/zmb-webui/backend"
FRONTEND_PATH="/opt/zmb-webui/frontend"
echo "🔄 ZMB Webui Update für $CONTAINER"
echo ""
# 1. Backend Files
echo "📦 Backend updaten..."
scp backend/services/shares.py root@$CONTAINER:$BACKEND_PATH/services/ > /dev/null 2>&1
scp backend/routers/navigator.py root@$CONTAINER:$BACKEND_PATH/routers/ > /dev/null 2>&1
scp backend/routers/shares.py root@$CONTAINER:$BACKEND_PATH/routers/ > /dev/null 2>&1
scp backend/main.py root@$CONTAINER:$BACKEND_PATH/ > /dev/null 2>&1
echo " ✓ Backend files"
# 2. Frontend bauen
echo "📦 Frontend bauen..."
cd frontend
rm -rf out .next 2>/dev/null || true
npm run build > /dev/null 2>&1
echo " ✓ Frontend gebaut"
# 3. Frontend deployen
echo "📦 Frontend deployen..."
scp -r out/* root@$CONTAINER:$FRONTEND_PATH/ > /dev/null 2>&1
echo " ✓ Frontend hochgeladen"
cd ..
# 4. Services restarren
echo "🔄 Services neustarten..."
ssh root@$CONTAINER "systemctl restart zmb-webui-backend" > /dev/null 2>&1
sleep 2
ssh root@$CONTAINER "systemctl restart nginx" > /dev/null 2>&1
echo " ✓ Backend restarted"
echo " ✓ Nginx restarted"
# 5. Status prüfen
echo ""
echo "✅ Update complete!"
echo ""
ssh root@$CONTAINER "systemctl status zmb-webui-backend nginx | grep -E 'Active:|running'" | while read line; do echo " $line"; done
echo ""
echo "🌐 Zugang: http://$CONTAINER:8090"
echo ""
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
# Quick update für Production Pi (10.66.120.3)
bash deploy/update-from-gitea.sh master pi
-3
View File
@@ -1,3 +0,0 @@
#!/bin/bash
# Quick update für Test-Container (192.168.1.179)
bash deploy/update-from-gitea.sh master 179