Update Apache configuration to include fallback for SPA routes and add start script in package.json for Nuxt server.

This commit is contained in:
Torsten Schulz (local)
2025-10-21 01:05:11 +02:00
parent 87c71b1382
commit f33990cf46
3 changed files with 36 additions and 1 deletions

30
deploy.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# deploy.sh - Deployment-Skript für Harheimer TC
echo "🚀 Starting Harheimer TC Deployment..."
# Repository aktualisieren
echo "📥 Updating repository..."
cd /var/www/harheimertc
git pull origin main
# Dependencies installieren
echo "📦 Installing dependencies..."
npm install
# Website bauen (Static Generation)
echo "🔨 Building website..."
npm run generate
# Berechtigungen setzen
echo "🔐 Setting permissions..."
sudo chown -R www-data:www-data /var/www/harheimertc/dist/
sudo chmod -R 755 /var/www/harheimertc/dist/
# PM2 Backend starten (falls nicht läuft)
echo "🖥️ Starting backend server..."
pm2 start ecosystem.config.cjs || pm2 restart harheimertc
echo "✅ Deployment completed!"
echo "🌐 Website: https://harheimertc.tsschulz.de"
echo "🔧 Backend: https://harheimertc.tsschulz.de/api/"