Browse Source

chore(api): bump dependencies

This includes a cryptography update, which now requires Rust to build,
significantly prolonging build time.

Prebuilt cryptography wheels are not supported on Alpine. It would work
on Ubuntu and Debian, but Ubuntu is not an option because the Python
Docker image has no Ubuntu version, and the Debian version comes with a
Postgres client version that is too old for us. So for now, we're stuck
with Alpine and (now slowly) building cryptography ourselves.
Peter Thomassen 4 years ago
parent
commit
910dd4541d
2 changed files with 4 additions and 5 deletions
  1. 2 3
      api/Dockerfile
  2. 2 2
      api/requirements.txt

+ 2 - 3
api/Dockerfile

@@ -12,10 +12,9 @@ ENV PIP_DISABLE_PIP_VERSION_CHECK=1
 ENV PIP_NO_CACHE_DIR=1
 ENV PIP_NO_CACHE_DIR=1
 
 
 COPY requirements.txt /usr/src/app/
 COPY requirements.txt /usr/src/app/
-RUN apk add --no-cache gcc freetype-dev libffi-dev musl-dev libmemcached-dev postgresql-dev jpeg-dev zlib-dev git \
+RUN apk add --no-cache gcc freetype-dev libffi-dev musl-dev libmemcached-dev postgresql-dev jpeg-dev zlib-dev git cargo \
     && pip install -r requirements.txt \
     && pip install -r requirements.txt \
-    && apk --no-cache del gcc
-RUN pip freeze
+    && pip freeze
 
 
 RUN mkdir /root/cronhook
 RUN mkdir /root/cronhook
 ADD ["cronhook/crontab", "cronhook/start-cron.sh", "/root/cronhook/"]
 ADD ["cronhook/crontab", "cronhook/start-cron.sh", "/root/cronhook/"]

+ 2 - 2
api/requirements.txt

@@ -1,7 +1,7 @@
 captcha~=0.3.0
 captcha~=0.3.0
 celery~=5.0.2
 celery~=5.0.2
-coverage~=5.4
-cryptography~=3.3.1
+coverage~=5.5
+cryptography~=3.4.7
 Django~=3.1.0
 Django~=3.1.0
 django-cors-headers~=3.7.0
 django-cors-headers~=3.7.0
 djangorestframework~=3.12.2
 djangorestframework~=3.12.2