From d60f54ed35bb318412b5a2f12a46af3ea855dffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20J=C4=99dyk?= Date: Thu, 9 Jun 2022 20:52:10 +0200 Subject: [PATCH] fix port gunicorn --- Dockerfile | 2 +- ayct_backend/__init__.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f13609b..dd21049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ COPY . . RUN pip3 install -r requirements.txt EXPOSE 5000/udp EXPOSE 5000/tcp -CMD ["gunicorn", "-b", "0.0.0.0:5000", "ayct_backend:app", "--timeout", "120"] \ No newline at end of file +CMD ["gunicorn", "-b", "0.0.0.0:$PORT", "ayct_backend:create_app()", "--timeout", "120"] \ No newline at end of file diff --git a/ayct_backend/__init__.py b/ayct_backend/__init__.py index 9a22515..4dee880 100644 --- a/ayct_backend/__init__.py +++ b/ayct_backend/__init__.py @@ -27,5 +27,3 @@ def create_app(): return "Hello world!" return app - -app = create_app()