From 42d27a90749cfd673b24dca518c6de587d8a6494 Mon Sep 17 00:00:00 2001 From: Danil Smirnov Date: Mon, 24 Aug 2020 16:09:45 +0000 Subject: [PATCH] Updating Postorius image --- postorius/Dockerfile | 10 ++++++---- postorius/docker-entrypoint.sh | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/postorius/Dockerfile b/postorius/Dockerfile index a91cdc9..551a972 100644 --- a/postorius/Dockerfile +++ b/postorius/Dockerfile @@ -12,17 +12,19 @@ COPY docker-entrypoint.sh /usr/local/bin/ # rights for management script RUN set -ex \ && apk add --no-cache --virtual .build-deps gcc libc-dev linux-headers \ - postgresql-dev mariadb-dev python3-dev libffi-dev gettext \ + postgresql-dev mariadb-dev python3-dev libffi-dev openldap-dev \ && apk add --no-cache --virtual .mailman-rundeps bash sassc \ - postgresql-client mysql-client py3-mysqlclient curl mailcap \ - python3 py3-pip libffi \ - && python3 -m pip install -U 'Django<3.0' pip wheel setuptools \ + postgresql-client mysql-client py3-mysqlclient curl mailcap gettext \ + python3 py3-pip libffi libuuid \ + && python3 -m pip install -U 'Django<3.0' pip setuptools wheel \ && python3 -m pip install postorius==1.3.3 \ uwsgi \ psycopg2 \ dj-database-url \ mysqlclient \ typing \ + django-auth-ldap \ + python-memcached \ && apk del .build-deps \ && addgroup -S mailman \ && adduser -S -G mailman mailman \ diff --git a/postorius/docker-entrypoint.sh b/postorius/docker-entrypoint.sh index 4163234..4af5773 100755 --- a/postorius/docker-entrypoint.sh +++ b/postorius/docker-entrypoint.sh @@ -113,7 +113,12 @@ else fi # Collect static for the django installation. -python3 manage.py collectstatic --noinput +python3 manage.py collectstatic --noinput --clear --verbosity 0 + +# Compile all the installed po files to mo. +SITE_DIR=$(python3 -c 'import site; print(site.getsitepackages()[0])') +echo "Compiling locale files in $SITE_DIR" +cd $SITE_DIR && python3 /opt/mailman-web/manage.py compilemessages && cd - # Migrate all the data to the database if this is a new installation, otherwise # this command will upgrade the database.