- Removed area/ directory with 816MB of media files - Removed sensitive FTP credentials from Git history - Implemented .env.upload system for secure deployments - Added comprehensive .gitignore for future protection This commit represents a clean slate with all sensitive data removed.
53 lines
1.3 KiB
Bash
Executable File
53 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# Setup-Skript für initiales Deployment
|
|
|
|
echo "🔧 Starte initiales Setup..."
|
|
|
|
# Prüfe ob wir im deployment/scripts/ Ordner sind und wechsle zur Projekt-Root
|
|
if [ "$(basename "$PWD")" = "scripts" ]; then
|
|
cd ../..
|
|
elif [ "$(basename "$PWD")" = "deployment" ]; then
|
|
cd ..
|
|
fi
|
|
|
|
# Dependencies installieren
|
|
echo "📦 Installiere Frontend Dependencies..."
|
|
cd frontend
|
|
npm install
|
|
|
|
# Development Build für Testing
|
|
echo "🛠️ Erstelle Development Build..."
|
|
npm run build
|
|
|
|
# Build ins Backend kopieren
|
|
echo "📁 Kopiere Build-Dateien..."
|
|
cp -r build/* ../backend/public/
|
|
|
|
# Rechte setzen
|
|
echo "🔒 Setze Dateiberechtigungen..."
|
|
chmod -R 755 ../backend/public
|
|
|
|
# Erstelle notwendige Verzeichnisse
|
|
echo "📂 Erstelle Backend-Verzeichnisse..."
|
|
mkdir -p ../backend/storage/data
|
|
chmod 755 ../backend/storage
|
|
chmod 755 ../backend/storage/data
|
|
|
|
# Erstelle Standard-Konfigurationsdateien falls nicht vorhanden
|
|
cd ../backend/storage/data
|
|
if [ ! -f "admins.json" ]; then
|
|
echo '[]' > admins.json
|
|
chmod 644 admins.json
|
|
fi
|
|
if [ ! -f "viewers.json" ]; then
|
|
echo '[]' > viewers.json
|
|
chmod 644 viewers.json
|
|
fi
|
|
if [ ! -f "clients.json" ]; then
|
|
echo '[]' > clients.json
|
|
chmod 644 clients.json
|
|
fi
|
|
|
|
echo "✅ Setup abgeschlossen!"
|
|
echo "📝 Konfiguriere nun deine Benutzer in backend/storage/data/"
|