Skip to content

Commit

Permalink
fix: uwsgi has version mismatches with precompiled python libs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
charn committed Sep 24, 2024
1 parent 33f51ca commit 8311575
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8311575

Please sign in to comment.