jamulix-homepage/deploy_to_localhost.sh
dschlueter c1c0061492 Fix: jamulix.de/ leitet wieder auf /landingpage/ weiter
Statt Symlink index.html → landingpage/index.html legen die Deploy-Skripte
jetzt webroot/index.html (meta-refresh + location.replace) in den Webroot.
README: Deploy-Schritte aktualisiert, Fehlerseiten-Konfig auf nginx
(error_page) statt Apache korrigiert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:21:48 +02:00

32 lines
994 B
Shell
Executable file

#!/bin/bash
# Lokales Deployment (Webroot: /var/www/html/)
set -e
LOCAL_DIR="/home/dschlueter/neue_jamulix.de_landing_page/jamulix.de_webpage_2"
ERROR_PAGES="401 403 404 500 502 503 504"
cd "$LOCAL_DIR"
echo "Baue die Seite..."
npm run build
echo "Synchronisiere landingpage/ nach /var/www/html/landingpage/..."
sudo rsync -av --delete landingpage/ /var/www/html/landingpage/
echo "Setze Weiterleitung: index.html → /landingpage/"
# rm zuerst: ein alter Symlink würde sonst landingpage/index.html überschreiben
sudo rm -f /var/www/html/index.html
sudo cp webroot/index.html /var/www/html/index.html
sudo chown www-data:www-data /var/www/html/index.html
echo "Kopiere Fehlerseiten: landingpage/<code>.html → <code>.html"
for c in $ERROR_PAGES; do
sudo cp "landingpage/$c.html" "/var/www/html/$c.html"
sudo chown www-data:www-data "/var/www/html/$c.html"
done
sudo chown -R www-data:www-data /var/www/html/landingpage/
echo ""
echo "Deployment abgeschlossen: http://localhost"