diff --git a/deploy.sh b/deploy.sh index 0d241fb..32d25e6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -15,10 +15,6 @@ if ! command -v sudo &> /dev/null; then exit 1 fi -# Verzeichnisstruktur erstellen -echo "Creating directory structure..." -sudo mkdir -p /opt/yourpart/{frontend,backend} - # Backend deployen echo "" echo "=== Deploying Backend ===" @@ -27,54 +23,7 @@ echo "=== Deploying Backend ===" # Frontend bauen und deployen echo "" echo "=== Building and Deploying Frontend ===" -./build-frontend.sh - -# Systemd Service installieren -echo "" -echo "=== Installing Systemd Service ===" -sudo cp yourpart.service /etc/systemd/system/ -sudo systemctl daemon-reload -sudo systemctl enable yourpart.service - -# Apache-Konfiguration installieren -echo "" -echo "=== Installing Apache Configuration ===" -sudo cp yourpart-http.conf /etc/apache2/sites-available/yourpart-http.conf -sudo cp yourpart-https.conf /etc/apache2/sites-available/yourpart-https.conf - -# Alte Konfiguration deaktivieren (falls vorhanden) -sudo a2dissite yourpart 2>/dev/null || true - -# Neue Konfiguration aktivieren -sudo a2ensite yourpart-http -sudo a2ensite yourpart-https - -# Apache-Module aktivieren -echo "Enabling required Apache modules..." -sudo a2enmod proxy -sudo a2enmod proxy_http -sudo a2enmod proxy_wstunnel -sudo a2enmod rewrite -sudo a2enmod ssl - -# Apache neu laden -echo "Reloading Apache..." -sudo systemctl reload apache2 - -# Backend-Service starten -echo "" -echo "=== Starting Backend Service ===" -sudo systemctl start yourpart.service - -# Status anzeigen -echo "" -echo "=== Deployment Status ===" -echo "Backend Service Status:" -sudo systemctl status yourpart.service --no-pager -l - -echo "" -echo "Apache Status:" -sudo systemctl status apache2 --no-pager -l +./deploy-frontend.sh echo "" echo "=== Deployment Completed! ==="