From 1af6f30239c492df9d17c1eae4394be5d6646296 Mon Sep 17 00:00:00 2001 From: FrantiĊĦek Zatloukal Date: Nov 02 2021 15:01:11 +0000 Subject: OpenShift Deployment Preparations --- diff --git a/.s2i/environment b/.s2i/environment new file mode 100644 index 0000000..cadffdc --- /dev/null +++ b/.s2i/environment @@ -0,0 +1,3 @@ +UPGRADE_PIP_TO_LATEST=1 +APP_CONFIG=/opt/app-root/src/gunicorn.cfg +WEB_CONCURRENCY=1 diff --git a/gunicorn.cfg b/gunicorn.cfg new file mode 100644 index 0000000..1d54d56 --- /dev/null +++ b/gunicorn.cfg @@ -0,0 +1,7 @@ +import logging +import sys + +gunicorn_logger = logging.getLogger('gunicorn.error') +gunicorn_logger.addHandler(logging.StreamHandler(sys.stdout)) +timeout = 120 +graceful_timeout = 120 diff --git a/requirements.txt b/requirements.txt index 5b37b26..3abb5cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,3 +29,6 @@ WTForms # this is not a direct dependency, but a workaround for https://github.com/psf/requests/issues/5710 idna == 2.10 + +# openshift deployment dependency +gunicorn == 20.1.0 diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..f09d88a --- /dev/null +++ b/wsgi.py @@ -0,0 +1 @@ +from blockerbugs import app as application