diff --git a/roles/openshift-apps/release-monitoring/files/buildconfig.yml b/roles/openshift-apps/release-monitoring/files/buildconfig.yml index 0922c126b4..df85a36892 100644 --- a/roles/openshift-apps/release-monitoring/files/buildconfig.yml +++ b/roles/openshift-apps/release-monitoring/files/buildconfig.yml @@ -17,6 +17,7 @@ items: license="MIT" RUN dnf install -y --enablerepo=updates-testing \ git \ + httpd \ graphviz \ python3-alembic \ python3-blinker \ @@ -27,7 +28,6 @@ items: python3-flask-login \ python3-flask-restful \ python3-flask-openid \ - python3-gunicorn \ python3-openid \ python3-pip \ python3-psycopg2 \ @@ -62,7 +62,6 @@ items: RUN ln -sf /etc/pki/fedmsg/crt/fedmsg-release-monitoring.crt /etc/pki/fedmsg/release-monitoring.crt EXPOSE 8080 EXPOSE 9940 - ENTRYPOINT gunicorn --bind 0.0.0.0:8080 --access-logfile=- anitya.wsgi:application type: Dockerfile strategy: type: Docker diff --git a/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml b/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml index 2d3c201e0c..fffe161ef0 100644 --- a/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml +++ b/roles/openshift-apps/release-monitoring/files/deploymentconfig.yml @@ -40,6 +40,10 @@ items: containers: - name: release-monitoring-web image: release-monitoring/release-monitoring-web:latest + command: + - bash + args: + - /etc/anitya/start.sh env: - name: USER value: anitya diff --git a/roles/openshift-apps/release-monitoring/templates/configmap.yml b/roles/openshift-apps/release-monitoring/templates/configmap.yml index 9414d5d8a5..414cfed4c7 100644 --- a/roles/openshift-apps/release-monitoring/templates/configmap.yml +++ b/roles/openshift-apps/release-monitoring/templates/configmap.yml @@ -138,6 +138,79 @@ items: [formatter_generic] format = %(levelname)-5.5s [%(name)s] %(message)s datefmt = %H:%M:%S + start.sh: |- + mkdir /httpdir/run + ln -s /etc/httpd/modules /httpdir/modules + truncate --size=0 /httpdir/accesslog /httpdir/errorlog + tail -qf /httpdir/accesslog /httpdir/errorlog & + exec httpd -f /etc/anitya/httpd.conf -DFOREGROUND -DNO_DETACH + httpd.conf: |- + Listen 0.0.0.0:8080 + ServerRoot "/httpdir" + PidFile "/httpdir/httpd.pid" + LoadModule authn_file_module modules/mod_authn_file.so + LoadModule authn_anon_module modules/mod_authn_anon.so + LoadModule authz_user_module modules/mod_authz_user.so + LoadModule authz_host_module modules/mod_authz_host.so + LoadModule include_module modules/mod_include.so + LoadModule log_config_module modules/mod_log_config.so + LoadModule env_module modules/mod_env.so + LoadModule ext_filter_module modules/mod_ext_filter.so + LoadModule expires_module modules/mod_expires.so + LoadModule headers_module modules/mod_headers.so + LoadModule mime_module modules/mod_mime.so + LoadModule status_module modules/mod_status.so + LoadModule negotiation_module modules/mod_negotiation.so + LoadModule dir_module modules/mod_dir.so + LoadModule alias_module modules/mod_alias.so + LoadModule rewrite_module modules/mod_rewrite.so + LoadModule version_module modules/mod_version.so + LoadModule wsgi_module modules/mod_wsgi_python3.so + LoadModule authn_core_module modules/mod_authn_core.so + LoadModule authz_core_module modules/mod_authz_core.so + LoadModule unixd_module modules/mod_unixd.so + LoadModule mpm_event_module modules/mod_mpm_event.so + StartServers 20 + ServerLimit 100 + MaxRequestsPerChild 2000 + MaxRequestWorkers 100 + + AllowOverride None + Require all granted + + + AllowOverride None + Require all granted + + + Require all granted + + + Header set Cache-Control public + ExpiresDefault "access plus 1 month" + Header unset ETag + + + Header set Cache-Control public + ExpiresDefault "access plus 1 month" + Header unset ETag + + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + CustomLog /httpdir/accesslog combined + ErrorLog /httpdir/errorlog + LogLevel info + TypesConfig /etc/mime.types + AddDefaultCharset UTF-8 + CoreDumpDirectory /tmp + Alias /docs /usr/local/lib/python3.7/anitya/static/docs/html/ + Alias /static /usr/local/lib/python3.7/site-packages/anitya/static/ + WSGIDaemonProcess anitya display-name=anitya processes=2 threads=2 maximum-requests=1000 home=/httpdir + WSGIApplicationGroup %{GLOBAL} + WSGISocketPrefix run/wsgi + WSGIRestrictStdout Off + WSGIRestrictSignal Off + WSGIPythonOptimize 1 + WSGIScriptAlias / /usr/share/anitya/anitya.wsgi - apiVersion: v1 kind: ConfigMap metadata: