"Update dependencies and scripts for improved stability (feat)"

This commit is contained in:
Till Tomczak 2025-05-23 11:09:58 +02:00
parent 9260a15d3d
commit 95a8784770
2 changed files with 55 additions and 25 deletions

View File

@ -214,32 +214,30 @@ prepare_configuration() {
log "⚙️ Bereite Konfiguration vor..." log "⚙️ Bereite Konfiguration vor..."
# Erstelle notwendige Verzeichnisse # Erstelle notwendige Verzeichnisse
mkdir -p instance logs migrations/versions mkdir -p instance logs migrations/versions uploads
# Kopiere Beispiel-Umgebungsvariablen falls nicht vorhanden # Setze Standard-Umgebungsvariablen für die Installation
if [ ! -f "env.backend" ]; then log "Setze Konfiguration (hardgecodet)..."
if [ -f "env.example" ]; then export FLASK_APP=app.py
log "Erstelle env.backend aus Vorlage..." export FLASK_ENV=$INSTALL_MODE
cp env.example env.backend export SECRET_KEY=7445630171969DFAC92C53CEC92E67A9CB2E00B3CB2F
else export DATABASE_PATH=instance/myp.db
log "Erstelle Standard env.backend..." export LOG_LEVEL=INFO
cat > env.backend << EOF export JOB_CHECK_INTERVAL=60
# MYP Backend Konfiguration export SOCKET_CHECK_INTERVAL=120
FLASK_ENV=$INSTALL_MODE export PRINTERS='{"Drucker 1": {"ip": "192.168.0.100"}, "Drucker 2": {"ip": "192.168.0.101"}, "Drucker 3": {"ip": "192.168.0.102"}, "Drucker 4": {"ip": "192.168.0.103"}, "Drucker 5": {"ip": "192.168.0.104"}, "Drucker 6": {"ip": "192.168.0.106"}}'
SECRET_KEY=7445630171969DFAC92C53CEC92E67A9CB2E00B3CB2F export TAPO_USERNAME=till.tomczak@mercedes-benz.com
DATABASE_PATH=instance/myp.db export TAPO_PASSWORD=744563017196A
LOG_LEVEL=INFO export HOST=0.0.0.0
JOB_CHECK_INTERVAL=60 export PORT=5000
PRINTERS={"Drucker 1": {"ip": "192.168.0.100"}, "Drucker 2": {"ip": "192.168.0.101"}, "Drucker 3": {"ip": "192.168.0.102"}, "Drucker 4": {"ip": "192.168.0.103"}, "Drucker 5": {"ip": "192.168.0.104"}, "Drucker 6": {"ip": "192.168.0.106"}} export BACKEND_URL=http://localhost:5000
TAPO_USERNAME=till.tomczak@mercedes-benz.com export UPLOAD_FOLDER=uploads
TAPO_PASSWORD=744563017196A export MAX_CONTENT_LENGTH=16777216
EOF export DEBUG=false
fi export TESTING=false
export DEVELOPMENT=false
warning_log "env.backend wurde erstellt. Bitte anpassen!" success_log "Konfiguration vorbereitet (hardgecodet)"
fi
success_log "Konfiguration vorbereitet"
} }
# Datenbank initialisieren # Datenbank initialisieren

View File

@ -25,6 +25,12 @@ urllib3>=2.0.0
# Smart Home Integration (Tapo) # Smart Home Integration (Tapo)
PyP100>=0.1.2 PyP100>=0.1.2
# System und Netzwerk Monitoring
psutil>=5.9.0
netifaces>=0.11.0
ping3>=4.0.0
speedtest-cli>=2.1.3
# Konfiguration und Umgebung # Konfiguration und Umgebung
python-dotenv>=1.0.0 python-dotenv>=1.0.0
@ -40,15 +46,41 @@ click>=8.1.0
validators>=0.20.0 validators>=0.20.0
python-dateutil>=2.8.0 python-dateutil>=2.8.0
pytz>=2023.3 pytz>=2023.3
schedule>=1.2.0
watchdog>=3.0.0
filelock>=3.12.0
# Caching
redis>=4.6.0
cachetools>=5.3.0
# JSON und Data Processing
jsonschema>=4.19.0
pydantic>=2.4.0
# Production Server (optional) # Production Server (optional)
gunicorn>=21.2.0 gunicorn>=21.2.0
gevent>=23.7.0 gevent>=23.7.0
supervisor>=4.2.0
# Entwicklung und Testing (optional) # Entwicklung und Testing (optional)
pytest>=7.4.0 pytest>=7.4.0
pytest-flask>=1.2.0 pytest-flask>=1.2.0
coverage>=7.3.0 coverage>=7.3.0
pytest-cov>=4.1.0
# Logging und Monitoring # Logging und Monitoring
structlog>=23.1.0 structlog>=23.1.0
colorlog>=6.7.0
# Performance und Memory
memory-profiler>=0.61.0
line-profiler>=4.1.0
# WebSockets (für Real-time Updates)
Flask-SocketIO>=5.3.0
python-socketio>=5.8.0
# Task Queue (optional für Background Jobs)
celery>=5.3.0
kombu>=5.3.0