From aef011f12adcd50c82c0fc94dc1baf0ab8b2c194 Mon Sep 17 00:00:00 2001 From: Hans Puettmann Date: Mon, 25 May 2026 15:33:02 +0200 Subject: [PATCH] =?UTF-8?q?app.py:=20PORT=20+=20FLASK=5FDEBUG=20via=20ENV?= =?UTF-8?q?=20=E2=80=94=20Hetzner-Port-Kollision=20mit=20meta.lehrstun.de?= =?UTF-8?q?=20geloest=20(3d-ag=20wird=20auf=205058=20deployen)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 6f56932..0a708e9 100644 --- a/app.py +++ b/app.py @@ -151,5 +151,9 @@ def err_501(e): if __name__ == "__main__": - # Port 5057 (5055 = quiz-collector, 5056 = arduino-db) - app.run(host="0.0.0.0", port=5057, debug=True) + # Port via ENV konfigurierbar (lokal 5057, Hetzner 5058 weil meta.lehrstun.de + # auf 5057 liegt). Debug-Modus auch via ENV, damit Production-Service ohne + # Debug + Auto-Reload laeuft. + port = int(os.environ.get("PORT", "5057")) + debug = os.environ.get("FLASK_DEBUG", "1") == "1" + app.run(host="0.0.0.0", port=port, debug=debug)