From 8311575d976870761f2db37ed61a09a381801076 Mon Sep 17 00:00:00 2001 From: Juha Louhiranta Date: Tue, 24 Sep 2024 13:48:46 +0300 Subject: [PATCH] fix: uwsgi has version mismatches with precompiled python libs Instead of using libxml2 we can use expat with uwsgi which avoids the version mismatch with precompiled python libraries. Also ssl is not terminated by uwsgi, so the feature can be disabled. Refs: HP-2655 --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed5748c6..e228854d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,7 @@ FROM helsinkitest/python-node:3.9-14-slim AS staticbuilder RUN apt-install.sh \ libxmlsec1-dev \ libxml2-dev \ + libexpat1-dev \ pkg-config \ git \ curl \ @@ -48,17 +49,18 @@ RUN apt-install.sh \ git \ libxmlsec1-dev \ libxml2-dev \ + libexpat1-dev \ netcat-openbsd \ pkg-config \ && pip install -U pip setuptools wheel \ && pip install --no-cache-dir -r /app/requirements.txt \ - && pip install --no-cache-dir -r /app/requirements-prod.txt \ + && UWSGI_PROFILE_OVERRIDE="ssl=false;xml=expat" pip install --no-cache-dir -r /app/requirements-prod.txt \ && apt-cleanup.sh build-essential pkg-config COPY docker-entrypoint.sh /app ENTRYPOINT ["./docker-entrypoint.sh"] -# STore static files under /var to not conflict with development volume mount +# Store static files under /var to not conflict with development volume mount ENV STATIC_ROOT /var/tunnistamo/static ENV MEDIA_ROOT /var/tunnistamo/media ENV NODE_MODULES_ROOT /var/tunnistamo/node_modules