jamulix-homepage/deploy_to_localhost.sh
dschlueter f01ce510f6 Deploy: favicon.ico im Webroot, Programmierer.png aus public/ entfernt
Browser fragen /favicon.ico ab — die Deploy-Skripte setzen jetzt einen
Symlink auf landingpage/favicon.ico. Programmierer.png liegt jetzt in
components/assets/ (statischer Import), damit der Export keine
ungenutzte 1,6-MB-Kopie mehr nach landingpage/ legt. README angepasst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:46:29 +02:00

41 lines
1.3 KiB
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 symbolischen Link: index.html → landingpage/index.html"
sudo rm -f /var/www/html/index.html
sudo ln -s landingpage/index.html /var/www/html/index.html
echo "Setze symbolischen Link: favicon.ico → landingpage/favicon.ico"
sudo rm -f /var/www/html/favicon.ico
sudo ln -s landingpage/favicon.ico /var/www/html/favicon.ico
# Next.js lädt unter / die RSC-Segmente ohne basePath (/__next.*.txt) — ebenfalls verlinken
echo "Setze symbolische Links: __next.*.txt → landingpage/__next.*.txt"
sudo rm -f /var/www/html/__next.*.txt
for f in landingpage/__next.*.txt; do
sudo ln -s "$f" "/var/www/html/$(basename "$f")"
done
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"