diff --git a/roles/bodhi2/base/templates/httpd.conf.j2 b/roles/bodhi2/base/templates/httpd.conf.j2 index 5e780bc5ec..5bd0dff20c 100644 --- a/roles/bodhi2/base/templates/httpd.conf.j2 +++ b/roles/bodhi2/base/templates/httpd.conf.j2 @@ -31,7 +31,7 @@ MaxRequestWorkers 100 AllowOverride None Require all granted - + AllowOverride None Require all granted @@ -56,7 +56,7 @@ TypesConfig /etc/mime.types AddDefaultCharset UTF-8 CoreDumpDirectory /tmp Alias /docs /usr/share/doc/bodhi-docs/html/ -Alias /static/v{{ bodhi_version.split('-')[0] }} /usr/lib/python3.10/site-packages/bodhi/server/static/ +Alias /static/v{{ bodhi_version.split('-')[0] }} /srv/bodhi-static/ WSGIDaemonProcess bodhi display-name=bodhi processes=4 threads=1 maximum-requests=500 home=/httpdir request-timeout=90 WSGIApplicationGroup %{GLOBAL} WSGISocketPrefix run/wsgi diff --git a/roles/openshift-apps/bodhi/templates/dockerfile-base b/roles/openshift-apps/bodhi/templates/dockerfile-base index 6562486e52..21e2e37a4a 100644 --- a/roles/openshift-apps/bodhi/templates/dockerfile-base +++ b/roles/openshift-apps/bodhi/templates/dockerfile-base @@ -1,4 +1,3 @@ -# WARNING: When changing the base distribution, adjust the python version in httpd.conf for static files FROM fedora:36 LABEL \ name="bodhi-base" \ @@ -9,14 +8,15 @@ RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedorapr {% else %} RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/infra/ansible/files/common/fedora-infra-tags.repo {% endif %} -# While dnf has a --nodocs, it doesen't have a --docs... -RUN sed -i '/nodocs/d' /etc/dnf/dnf.conf {% if env == "staging" %} RUN dnf install -y bodhi-server python3-pyramid_sawing python3-gunicorn --refresh {% else %} RUN dnf install -y bodhi-server-{{bodhi_version}} python3-pyramid_sawing python3-gunicorn {% endif %} +# link the static files for a simpler httpd.conf +RUN ln -s $(python3 -Ic "import sysconfig; print(sysconfig.get_path('purelib', 'rpm_prefix'))")/bodhi/server/static/ /srv/bodhi-static + # Set up krb5 RUN rm -f /etc/krb5.conf && \ ln -sf /etc/bodhi/krb5.conf /etc/krb5.conf && \