"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..."
# Erstelle notwendige Verzeichnisse
mkdir -p instance logs migrations/versions
mkdir -p instance logs migrations/versions uploads
# Kopiere Beispiel-Umgebungsvariablen falls nicht vorhanden
if [ ! -f "env.backend" ]; then
if [ -f "env.example" ]; then
log "Erstelle env.backend aus Vorlage..."
cp env.example env.backend
else
log "Erstelle Standard env.backend..."
cat > env.backend << EOF
# MYP Backend Konfiguration
FLASK_ENV=$INSTALL_MODE
SECRET_KEY=7445630171969DFAC92C53CEC92E67A9CB2E00B3CB2F
DATABASE_PATH=instance/myp.db
LOG_LEVEL=INFO
JOB_CHECK_INTERVAL=60
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"}}
TAPO_USERNAME=till.tomczak@mercedes-benz.com
TAPO_PASSWORD=744563017196A
EOF
fi
warning_log "env.backend wurde erstellt. Bitte anpassen!"
fi
# Setze Standard-Umgebungsvariablen für die Installation
log "Setze Konfiguration (hardgecodet)..."
export FLASK_APP=app.py
export FLASK_ENV=$INSTALL_MODE
export SECRET_KEY=7445630171969DFAC92C53CEC92E67A9CB2E00B3CB2F
export DATABASE_PATH=instance/myp.db
export LOG_LEVEL=INFO
export JOB_CHECK_INTERVAL=60
export SOCKET_CHECK_INTERVAL=120
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"}}'
export TAPO_USERNAME=till.tomczak@mercedes-benz.com
export TAPO_PASSWORD=744563017196A
export HOST=0.0.0.0
export PORT=5000
export BACKEND_URL=http://localhost:5000
export UPLOAD_FOLDER=uploads
export MAX_CONTENT_LENGTH=16777216
export DEBUG=false
export TESTING=false
export DEVELOPMENT=false
success_log "Konfiguration vorbereitet"
success_log "Konfiguration vorbereitet (hardgecodet)"
}
# Datenbank initialisieren

View File

@ -25,6 +25,12 @@ urllib3>=2.0.0
# Smart Home Integration (Tapo)
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
python-dotenv>=1.0.0
@ -40,15 +46,41 @@ click>=8.1.0
validators>=0.20.0
python-dateutil>=2.8.0
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)
gunicorn>=21.2.0
gevent>=23.7.0
supervisor>=4.2.0
# Entwicklung und Testing (optional)
pytest>=7.4.0
pytest-flask>=1.2.0
coverage>=7.3.0
pytest-cov>=4.1.0
# 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