Remove deprecated scripts for adding head-matter to wt_config.xml, including Python and Bash implementations, to streamline configuration management.

This commit is contained in:
Torsten Schulz (local)
2025-12-04 16:34:45 +01:00
parent 4b674c7c60
commit 6e9116e819
13187 changed files with 1493219 additions and 337 deletions

93
install.sh Executable file
View File

@@ -0,0 +1,93 @@
#!/bin/bash
# SingleChat Installation Script
# Dieses Skript installiert die SingleChat-Anwendung für Production
set -e # Beende bei Fehlern
echo "=========================================="
echo "SingleChat Installation"
echo "=========================================="
# Prüfe ob Node.js installiert ist
if ! command -v node &> /dev/null; then
echo "FEHLER: Node.js ist nicht installiert!"
echo "Bitte installiere Node.js (Version 18 oder höher)"
exit 1
fi
NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "FEHLER: Node.js Version 18 oder höher erforderlich!"
echo "Aktuelle Version: $(node -v)"
exit 1
fi
echo "✓ Node.js Version: $(node -v)"
# Installiere Dependencies
echo ""
echo "Installiere Dependencies..."
npm run install:all
if [ $? -ne 0 ]; then
echo "FEHLER: Installation der Dependencies fehlgeschlagen!"
exit 1
fi
echo "✓ Dependencies installiert"
# Baue Client
echo ""
echo "Baue Client für Production..."
npm run build
if [ $? -ne 0 ]; then
echo "FEHLER: Build fehlgeschlagen!"
exit 1
fi
echo "✓ Client gebaut"
# Kopiere dist nach docroot
echo ""
echo "Kopiere gebaute Dateien nach docroot..."
if [ -d "docroot/dist" ]; then
rm -rf docroot/dist
fi
cp -r client/dist docroot/
echo "✓ Dateien kopiert"
# Erstelle .env Datei falls nicht vorhanden
if [ ! -f ".env" ]; then
echo ""
echo "Erstelle .env Datei..."
cat > .env << EOF
NODE_ENV=production
PORT=4000
SESSION_SECRET=$(openssl rand -hex 32)
EOF
echo "✓ .env Datei erstellt"
echo "WICHTIG: Bitte ändere SESSION_SECRET in .env!"
else
echo "✓ .env Datei existiert bereits"
fi
# Prüfe ob systemd Service existiert
echo ""
echo "=========================================="
echo "Installation abgeschlossen!"
echo "=========================================="
echo ""
echo "Nächste Schritte:"
echo "1. Überprüfe die .env Datei und passe SESSION_SECRET an"
echo "2. Stelle sicher, dass Apache korrekt konfiguriert ist"
echo "3. Starte den Server mit: npm run start:prod"
echo " oder als systemd Service (siehe install-service.sh)"
echo ""
echo "Apache-Konfiguration sollte enthalten:"
echo " ProxyPass / http://localhost:4000/"
echo " ProxyPassReverse / http://localhost:4000/"
echo ""