🎉 Feature: Optimized CSS build process for improved performance 🎉
This commit is contained in:
@@ -930,9 +930,9 @@ EOF
|
||||
}
|
||||
|
||||
install_python_packages() {
|
||||
log "=== ROBUSTE PYTHON-PAKETE INSTALLATION ==="
|
||||
log "=== TIMEOUT-GESICHERTE PYTHON-PAKETE INSTALLATION ==="
|
||||
|
||||
progress "Installiere Python-Pakete mit verbesserter Strategie..."
|
||||
progress "Installiere Python-Pakete mit Timeout-Sicherung..."
|
||||
|
||||
if [ ! -f "$CURRENT_DIR/requirements.txt" ]; then
|
||||
error "requirements.txt nicht gefunden: $CURRENT_DIR/requirements.txt"
|
||||
@@ -941,74 +941,48 @@ install_python_packages() {
|
||||
# Kopiere requirements.txt
|
||||
cp "$CURRENT_DIR/requirements.txt" "$APP_DIR/" 2>/dev/null || true
|
||||
|
||||
# Strategie 1: Direkte Installation mit pip
|
||||
progress "Versuche direkte requirements.txt Installation..."
|
||||
# Timeout-gesicherte pip-Optionen
|
||||
local pip_opts="--break-system-packages --timeout 60 --retries 2 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --no-cache-dir"
|
||||
|
||||
local pip_opts="--break-system-packages --timeout 120 --retries 5 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org"
|
||||
# Strategie 1: Direkte Installation mit Timeout
|
||||
progress "Versuche direkte requirements.txt Installation (max 10 Minuten)..."
|
||||
|
||||
if python3 -m pip install $pip_opts -r "$CURRENT_DIR/requirements.txt"; then
|
||||
if timeout 600 python3 -m pip install $pip_opts -r "$CURRENT_DIR/requirements.txt" >/dev/null 2>&1; then
|
||||
success "✅ requirements.txt erfolgreich installiert"
|
||||
return 0
|
||||
else
|
||||
warning "⚠️ Direkte Installation fehlgeschlagen - verwende Schritt-für-Schritt Installation"
|
||||
warning "⚠️ Direkte Installation fehlgeschlagen oder Timeout - verwende minimale Installation"
|
||||
|
||||
# Strategie 2: Pakete in optimierter Reihenfolge installieren
|
||||
progress "Installiere Core-Abhängigkeiten zuerst..."
|
||||
# Strategie 2: Nur essenzielle Pakete (timeout-gesichert)
|
||||
progress "Installiere nur essenzielle Flask-Komponenten..."
|
||||
|
||||
# Grundlegende Abhängigkeiten zuerst
|
||||
local core_deps=(
|
||||
"MarkupSafe==3.0.2"
|
||||
"itsdangerous==2.2.0"
|
||||
"click==8.1.7"
|
||||
"Werkzeug==3.1.3"
|
||||
"Jinja2==3.1.4"
|
||||
"Flask==3.1.1"
|
||||
# Minimale Flask-Installation für Funktionalität
|
||||
local essential_deps=(
|
||||
"Flask"
|
||||
"Werkzeug"
|
||||
"Jinja2"
|
||||
"requests"
|
||||
)
|
||||
|
||||
for dep in "${core_deps[@]}"; do
|
||||
progress "Installiere: $dep"
|
||||
retry_command "python3 -m pip install $pip_opts '$dep'" "$dep Installation"
|
||||
local installed_count=0
|
||||
for dep in "${essential_deps[@]}"; do
|
||||
progress "Installiere essenzielle Abhängigkeit: $dep"
|
||||
if timeout 120 python3 -m pip install $pip_opts "$dep" >/dev/null 2>&1; then
|
||||
success "✅ $dep erfolgreich installiert"
|
||||
((installed_count++))
|
||||
else
|
||||
warning "⚠️ $dep Installation fehlgeschlagen oder Timeout"
|
||||
debug "$dep Timeout oder Fehler bei Installation"
|
||||
fi
|
||||
done
|
||||
|
||||
# Flask-Extensions
|
||||
progress "Installiere Flask-Extensions..."
|
||||
local flask_extensions=(
|
||||
"WTForms==3.1.2"
|
||||
"Flask-WTF==1.2.1"
|
||||
"Flask-Login==0.6.3"
|
||||
)
|
||||
|
||||
for ext in "${flask_extensions[@]}"; do
|
||||
progress "Installiere: $ext"
|
||||
retry_command "python3 -m pip install $pip_opts '$ext'" "$ext Installation"
|
||||
done
|
||||
|
||||
# Datenbank und Sicherheit
|
||||
progress "Installiere Datenbank und Sicherheits-Komponenten..."
|
||||
local db_security=(
|
||||
"SQLAlchemy==2.0.36"
|
||||
"cryptography==44.0.0"
|
||||
"bcrypt==4.2.1"
|
||||
)
|
||||
|
||||
for comp in "${db_security[@]}"; do
|
||||
progress "Installiere: $comp"
|
||||
retry_command "python3 -m pip install $pip_opts '$comp'" "$comp Installation"
|
||||
done
|
||||
|
||||
# System-Abhängigkeiten
|
||||
progress "Installiere System-Abhängigkeiten..."
|
||||
local system_deps=(
|
||||
"requests==2.32.3"
|
||||
"psutil==6.1.1"
|
||||
"python-dateutil==2.9.0"
|
||||
"colorlog==6.9.0"
|
||||
"gunicorn==23.0.0"
|
||||
)
|
||||
|
||||
for dep in "${system_deps[@]}"; do
|
||||
progress "Installiere: $dep"
|
||||
retry_command "python3 -m pip install $pip_opts '$dep'" "$dep Installation" || warning "⚠️ $dep Installation fehlgeschlagen (optional)"
|
||||
done
|
||||
if [ $installed_count -eq 0 ]; then
|
||||
warning "⚠️ Keine Python-Pakete konnten installiert werden"
|
||||
warning "⚠️ System läuft möglicherweise mit bereits installierten Paketen"
|
||||
info " → Manuell: pip3 install --break-system-packages Flask requests"
|
||||
else
|
||||
success "✅ $installed_count von ${#essential_deps[@]} essenziellen Paketen installiert"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Umfassende Validierung
|
||||
|
Reference in New Issue
Block a user