From 84b5bbe3259cfe993ed4f6786d462920074d9b35 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 11 Feb 2025 21:59:14 +0100 Subject: [PATCH] python 3.11 --- Dockerfile | 2 +- src/run.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75e3113..61b6567 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12-alpine3.21 +FROM python:3.11-alpine3.21 ENV REDIS_URL="" ENV SECRET_KEY="" diff --git a/src/run.py b/src/run.py index d5eee5c..ed8a6be 100644 --- a/src/run.py +++ b/src/run.py @@ -1,7 +1,6 @@ from flask import Flask, session, g, render_template_string, Response from flask_session import Session from flask_oidc import OpenIDConnect -import kaleido from werkzeug.middleware.proxy_fix import ProxyFix from loguru import logger import redis @@ -162,7 +161,7 @@ def ntpserver(): select time_bucket('5 minutes', time) as bucket, device, avg(cast(values->'rootdisp'->>'value' as float)) as rootdisp, - avg(cast(values->'stratum'->>'value' as int)) as stratum + max(cast(values->'stratum'->>'value' as int)) as stratum from measurements where time >= date_trunc('day', now()) AND time < date_trunc('day', now()) + '1 day'::interval and application = 'TSM' and attributes->>'Label' = 'david' @@ -209,7 +208,7 @@ def ntpserver(): if __name__ == '__main__': - app.run(port=8080) + app.run(host="0.0.0.0", port=8080) else: exposed_app = ProxyFix(app, x_for=1, x_host=1)