Add support for deploying testdays via s2i

- Tweak gunicorn's configuration for logging
- Adjust the requirements to include what is needed for s2i
- Add a wsgi.py script to start the application

Signed-off-by: Pierre-Yves Chibon <pingou@pingoured.fr>
This commit is contained in:
Pierre-YvesChibon 2020-10-02 10:37:41 +02:00
commit 4b48aade12
4 changed files with 11 additions and 0 deletions

2
.s2i/environment Normal file
View file

@ -0,0 +1,2 @@
UPGRADE_PIP_TO_LATEST=1
APP_CONFIG=/opt/app-root/src/gunicorn.cfg

5
gunicorn.cfg Normal file
View file

@ -0,0 +1,5 @@
import logging
import sys
gunicorn_logger = logging.getLogger('gunicorn.error')
gunicorn_logger.addHandler(logging.StreamHandler(sys.stdout))

View file

@ -9,3 +9,6 @@ Flask-Caching
alembic
resultsdb-api
python-fedora
# Requirements - only for s2i support
gunicorn
psycopg2

1
wsgi.py Normal file
View file

@ -0,0 +1 @@
from testdays import app as application