mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +00:00
allow werkzeug to work in our environment
This commit is contained in:
@@ -296,8 +296,8 @@ else
|
||||
echo "Building rpi-rgb-led-matrix Python bindings..."
|
||||
make build-python PYTHON=$(which python3)
|
||||
cd bindings/python
|
||||
echo "Installing rpi-rgb-led-matrix Python package..."
|
||||
python3 setup.py install
|
||||
echo "Installing rpi-rgb-led-matrix Python package via pip..."
|
||||
python3 -m pip install --break-system-packages .
|
||||
popd >/dev/null
|
||||
else
|
||||
echo "✗ rpi-rgb-led-matrix-master directory not found at $PROJECT_ROOT_DIR"
|
||||
@@ -355,10 +355,14 @@ echo "Step 7: Installing web interface service..."
|
||||
echo "-------------------------------------------"
|
||||
|
||||
if [ -f "$PROJECT_ROOT_DIR/install_web_service.sh" ]; then
|
||||
if [ ! -f "/etc/systemd/system/ledmatrix-web.service" ]; then
|
||||
bash "$PROJECT_ROOT_DIR/install_web_service.sh"
|
||||
# Ensure systemd sees any new/changed unit files
|
||||
systemctl daemon-reload || true
|
||||
echo "✓ Web interface service installed"
|
||||
else
|
||||
echo "ledmatrix-web.service already present; preserving existing configuration and skipping static installer"
|
||||
fi
|
||||
else
|
||||
echo "⚠ install_web_service.sh not found; skipping web service installation"
|
||||
fi
|
||||
|
||||
@@ -1401,4 +1401,13 @@ if __name__ == '__main__':
|
||||
# In threading mode this uses Werkzeug; allow it explicitly for systemd usage
|
||||
# Use eventlet server when available; fall back to Werkzeug in threading mode
|
||||
logger.info(f"Starting web interface on http://0.0.0.0:5001 (async_mode={ASYNC_MODE})")
|
||||
socketio.run(app, host='0.0.0.0', port=5001, debug=False, use_reloader=False)
|
||||
# When running without eventlet/gevent, Flask-SocketIO uses Werkzeug, which now
|
||||
# enforces a production guard unless explicitly allowed. Enable it here.
|
||||
socketio.run(
|
||||
app,
|
||||
host='0.0.0.0',
|
||||
port=5001,
|
||||
debug=False,
|
||||
use_reloader=False,
|
||||
allow_unsafe_werkzeug=True
|
||||
)
|
||||
Reference in New Issue
Block a user