From 17aaa750e9b81554470ef28c7de3cfa5897c4ab6 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Fri, 7 Jun 2024 01:46:51 +0200 Subject: [PATCH] Test shutdown. --- Dockerfile | 2 +- thermostat.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 101b340..0b33e24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,4 @@ RUN pip install flask-restx==1.3.0 WORKDIR /root COPY thermostat.py /root/ ENV FLASK_APP thermostat.py -ENTRYPOINT ["/usr/bin/gunicorn", "thermostat:app"] +ENTRYPOINT ["/usr/bin/gunicorn", "thermostat:gunicorn_app"] diff --git a/thermostat.py b/thermostat.py index fa14692..9b1c1d4 100755 --- a/thermostat.py +++ b/thermostat.py @@ -388,6 +388,7 @@ xprint('toto') t1 = Thread(target=thermostat_loop) #t1.daemon = True t1.start() +gunicorn_app = app t1.join() exit(0) # app.run(host='0.0.0.0', port=3002)