Merge pull request #398 from danil-smirnov/postorius-updates

postorius:
- Install gettext as a runtime deps
- Install django-auth-ldap and openldap-dev packages
- Install Python-memcached
- Compile locale files for all the installed python apps.
This commit is contained in:
Abhilash Raj
2020-08-24 10:02:14 -07:00
committed by GitHub
2 changed files with 12 additions and 5 deletions

View File

@@ -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 \

View File

@@ -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.