mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +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..."
|
echo "Building rpi-rgb-led-matrix Python bindings..."
|
||||||
make build-python PYTHON=$(which python3)
|
make build-python PYTHON=$(which python3)
|
||||||
cd bindings/python
|
cd bindings/python
|
||||||
echo "Installing rpi-rgb-led-matrix Python package..."
|
echo "Installing rpi-rgb-led-matrix Python package via pip..."
|
||||||
python3 setup.py install
|
python3 -m pip install --break-system-packages .
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
else
|
else
|
||||||
echo "✗ rpi-rgb-led-matrix-master directory not found at $PROJECT_ROOT_DIR"
|
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 "-------------------------------------------"
|
echo "-------------------------------------------"
|
||||||
|
|
||||||
if [ -f "$PROJECT_ROOT_DIR/install_web_service.sh" ]; then
|
if [ -f "$PROJECT_ROOT_DIR/install_web_service.sh" ]; then
|
||||||
bash "$PROJECT_ROOT_DIR/install_web_service.sh"
|
if [ ! -f "/etc/systemd/system/ledmatrix-web.service" ]; then
|
||||||
# Ensure systemd sees any new/changed unit files
|
bash "$PROJECT_ROOT_DIR/install_web_service.sh"
|
||||||
systemctl daemon-reload || true
|
# Ensure systemd sees any new/changed unit files
|
||||||
echo "✓ Web interface service installed"
|
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
|
else
|
||||||
echo "⚠ install_web_service.sh not found; skipping web service installation"
|
echo "⚠ install_web_service.sh not found; skipping web service installation"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1401,4 +1401,13 @@ if __name__ == '__main__':
|
|||||||
# In threading mode this uses Werkzeug; allow it explicitly for systemd usage
|
# In threading mode this uses Werkzeug; allow it explicitly for systemd usage
|
||||||
# Use eventlet server when available; fall back to Werkzeug in threading mode
|
# 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})")
|
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