add gunicorn 2

This commit is contained in:
Michael Grote 2023-04-13 14:58:39 +02:00
parent e15c6e4727
commit 1950d759ba
3 changed files with 6 additions and 5 deletions

View file

@ -19,4 +19,6 @@ RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
#CMD [ "python3", "-m" , "flask", "run", "--port", "5000", "--host", "0.0.0.0"]
CMD [ "python3", "-m" , "gunicorn", "app:app", "-c", "gunicorn_config.py"]

3
gunicorn_config.py Normal file
View file

@ -0,0 +1,3 @@
bind = "0.0.0.0:5000"
workers = 2
threads = 4

View file

@ -1,4 +0,0 @@
from app import app
if __name__ == '__main__':
app.run()