From cad35b2ae91178eed527f30f607915ec9031ffb8 Mon Sep 17 00:00:00 2001 From: Marc Chakiachvili Date: Tue, 18 Apr 2023 14:22:19 +0100 Subject: [PATCH] Updated Docker image and gunicorn for Port parameter --- Dockerfile | 2 +- gunicorn_config.py | 5 +++-- setup.py | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e01a540..7eb2c82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ COPY --chown=appuser:appuser . /home/appuser/datachecks #Install dependencies RUN python -m venv /home/appuser/datachecks/venv ENV PATH="/home/appuser/datachecks/venv/bin:$PATH" -RUN pip install -r requirements.txt +RUN pip install wheel RUN pip install . # clone datacheck app ENV DATACHECK_CONFIG_PATH="/home/appuser/datachecks/config.yaml" diff --git a/gunicorn_config.py b/gunicorn_config.py index 459a5c7..4fa397a 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -29,8 +29,9 @@ # range. # -# bind = '0.0.0.0:5006' -backlog = 2048 +import os +bind = os.getenv("GUNICORN_BIND", "0.0.0.0:5001") +backlog = int(os.getenv("GUNICORN_BACKLOG", "2048")) # # Worker processes diff --git a/setup.py b/setup.py index c3ccaeb..4d6235e 100644 --- a/setup.py +++ b/setup.py @@ -41,6 +41,7 @@ def import_requirements(): maintainer_email='ensembl-production@ebi.ac.uk', description='Ensembl datacheck service', python_requires='>=3.7', + install_requires=import_requirements(), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers',