security: clean repository without media files and sensitive data
- 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.
This commit is contained in:
52
deployment/scripts/setup.sh
Executable file
52
deployment/scripts/setup.sh
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/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/"
|
||||
Reference in New Issue
Block a user