From 64323c366fac336de6a46f94bbd98c924d39d0d9 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 17 Jan 2026 22:40:41 +0100 Subject: [PATCH 1/3] bind to 0.0.0.0 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32dfcaf..3e5adf2 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # Benutzung - als **root** ausführen -- gunicorn -w 1 -k gthread main:app +- gunicorn -b 0.0.0.0 -w 1 -k gthread main:app # Dateien From 035751acda9e154281faba19cd175f23928c36ca Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 17 Jan 2026 22:45:46 +0100 Subject: [PATCH 2/3] add systemd service --- README.md | 8 ++++++++ matrix.service | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 matrix.service diff --git a/README.md b/README.md index 3e5adf2..c6573e4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,12 @@ - als **root** ausführen - gunicorn -b 0.0.0.0 -w 1 -k gthread main:app +# Beim Booten starten + +- Kopiere die systemd/matrix.service nach /etc/systemd/service/ +- systemctl daemon-reload +- systemctl enable --now matrix + # Dateien - main.py (das Hauptprogramm und der Flask-Webserver) @@ -43,6 +49,8 @@ curl http://localhost:8000/start/bitcoin curl http://localhost:8000/start/clock curl http://localhost:8000/start/colorclock curl http://localhost:8000/start/helloworld +curl http://localhost:8000/start/scroll +curl http://localhost:8000/start/piamedia curl http://localhost:8000/stop curl http://localhost:8000/reset diff --git a/matrix.service b/matrix.service new file mode 100644 index 0000000..219774e --- /dev/null +++ b/matrix.service @@ -0,0 +1,15 @@ +[Unit] +Description=Matrix Flask Application +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/matrix +ExecStart=/usr/bin/gunicorn -b 0.0.0.0 -w 1 -k gthread main:app +Restart=always +RestartSec=5s +User=root +Group=root + +[Install] +WantedBy=multi-user.target From c1f04bb58f0261f7da0bcfefd5aeeffbd85f9c94 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 17 Jan 2026 22:59:37 +0100 Subject: [PATCH 3/3] reformat --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c6573e4..2c4be01 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,15 @@ Für deutsche Ausgabe (z.B. den Monatsnamen): # Szenen -curl "http://localhost:8000/start/color?red=255&green=255&blue=255" -curl http://localhost:8000/start/bitcoin -curl http://localhost:8000/start/clock -curl http://localhost:8000/start/colorclock -curl http://localhost:8000/start/helloworld -curl http://localhost:8000/start/scroll -curl http://localhost:8000/start/piamedia -curl http://localhost:8000/stop -curl http://localhost:8000/reset +- curl "http://localhost:8000/start/color?red=255&green=255&blue=255" +- curl http://localhost:8000/start/bitcoin +- curl http://localhost:8000/start/clock +- curl http://localhost:8000/start/colorclock +- curl http://localhost:8000/start/helloworld +- curl http://localhost:8000/start/scroll +- curl http://localhost:8000/start/piamedia +- curl http://localhost:8000/stop +- curl http://localhost:8000/reset # Entwicklung ohne Matrix-Display