From 951d44ba5e0c136383cfd26eec63b75e0ef0d7bd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 03 2022 12:51:11 +0000 Subject: Add support for s2i to fedocal Signed-off-by: Pierre-Yves Chibon --- diff --git a/.s2i/environment b/.s2i/environment new file mode 100644 index 0000000..e674f1e --- /dev/null +++ b/.s2i/environment @@ -0,0 +1,6 @@ +FEDOCAL_CONFIG=/opt/app-root/config/fedocal.cfg +FEDORA_MESSAGING_CONF=/opt/app-root/config/fedora-messaging.toml +UPGRADE_PIP_TO_LATEST=1 +LANG=en_US.UTF-8 +LC_ALL=en_US.UTF-8 +LC_CTYPE=en_US.UTF-8 diff --git a/alembic_upgrade.sh b/alembic_upgrade.sh new file mode 100644 index 0000000..373553a --- /dev/null +++ b/alembic_upgrade.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +pip install alembic +alembic -c /opt/app-root/config/alembic.ini upgrade head diff --git a/requirements.txt b/requirements.txt index 982f127..37e48e5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ flask flask-babel flask-oidc mock==1.1.2 -python-dateutil #<= 1.5 +python-dateutil<=2.7.0 python-fedora>=0.3.33 pytz>=2013b sqlalchemy @@ -24,3 +24,6 @@ flask_oidc fedora-messaging email_validator fedocal-messages>=1.5.0 + +gunicorn +psycopg2 diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..9f8d06f --- /dev/null +++ b/wsgi.py @@ -0,0 +1,7 @@ +import logging +import sys + +gunicorn_logger = logging.getLogger('gunicorn.error') +gunicorn_logger.addHandler(logging.StreamHandler(sys.stdout)) + +from fedocal import APP as application