diff --git a/Dockerfile b/Dockerfile index e29bb9d..bb48283 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/gunicorn_config.py b/gunicorn_config.py new file mode 100644 index 0000000..c7342ad --- /dev/null +++ b/gunicorn_config.py @@ -0,0 +1,3 @@ +bind = "0.0.0.0:5000" +workers = 2 +threads = 4 diff --git a/wsgi.py b/wsgi.py deleted file mode 100644 index 08f9dd1..0000000 --- a/wsgi.py +++ /dev/null @@ -1,4 +0,0 @@ -from app import app - -if __name__ == '__main__': - app.run()