From 5fa490adf4bbc6402542d361f9c3eac9273a1fa1 Mon Sep 17 00:00:00 2001 From: yuanmengqi Date: Sun, 27 Jul 2025 16:14:07 +0000 Subject: [PATCH] fix: update Flask port configuration to support environment variable - Modified the Flask application to allow the port to be set via the `FLASK_PORT` environment variable, defaulting to 8080 if not specified. - Ensured existing application logic remains unchanged while enhancing configurability for deployment environments. --- monitor/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/main.py b/monitor/main.py index 88145bf..914757b 100644 --- a/monitor/main.py +++ b/monitor/main.py @@ -733,7 +733,7 @@ if __name__ == '__main__': # Start web service host = os.getenv("FLASK_HOST", "0.0.0.0") - port = 8080 + port = os.getenv("FLASK_PORT", 8080) debug = os.getenv("FLASK_DEBUG", "false").lower() == "true" app.run(host=host, port=port, debug=debug, threaded=True) \ No newline at end of file