Update Apache configuration to include fallback for SPA routes and add start script in package.json for Nuxt server.
This commit is contained in:
30
deploy.sh
Normal file
30
deploy.sh
Normal 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/"
|
||||
Reference in New Issue
Block a user