python 3.11
This commit is contained in:
parent
a42254cf95
commit
84b5bbe325
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.12-alpine3.21
|
FROM python:3.11-alpine3.21
|
||||||
|
|
||||||
ENV REDIS_URL=""
|
ENV REDIS_URL=""
|
||||||
ENV SECRET_KEY=""
|
ENV SECRET_KEY=""
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
from flask import Flask, session, g, render_template_string, Response
|
from flask import Flask, session, g, render_template_string, Response
|
||||||
from flask_session import Session
|
from flask_session import Session
|
||||||
from flask_oidc import OpenIDConnect
|
from flask_oidc import OpenIDConnect
|
||||||
import kaleido
|
|
||||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
import redis
|
import redis
|
||||||
@ -162,7 +161,7 @@ def ntpserver():
|
|||||||
select time_bucket('5 minutes', time) as bucket,
|
select time_bucket('5 minutes', time) as bucket,
|
||||||
device,
|
device,
|
||||||
avg(cast(values->'rootdisp'->>'value' as float)) as rootdisp,
|
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
|
from measurements
|
||||||
where time >= date_trunc('day', now()) AND time < date_trunc('day', now()) + '1 day'::interval and
|
where time >= date_trunc('day', now()) AND time < date_trunc('day', now()) + '1 day'::interval and
|
||||||
application = 'TSM' and attributes->>'Label' = 'david'
|
application = 'TSM' and attributes->>'Label' = 'david'
|
||||||
@ -209,7 +208,7 @@ def ntpserver():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(port=8080)
|
app.run(host="0.0.0.0", port=8080)
|
||||||
else:
|
else:
|
||||||
exposed_app = ProxyFix(app, x_for=1, x_host=1)
|
exposed_app = ProxyFix(app, x_for=1, x_host=1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user