Several change to mailman-web image.
- Download source code as zip from gitlab instead of git+https because speed. - Check if the $DATABASE_URL is not defined, use a default sqlite database. - Use dj-database-url package to set database in django settings using DATABASE_URL environment variable. - Use UWSGI_LOG_URL as the URL for UWSGI logging and set it to a default value if it has not been defined.
This commit is contained in:
@@ -2,17 +2,27 @@ FROM python:2.7
|
||||
|
||||
MAINTAINER Abhilash Raj
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y ruby-sass \
|
||||
git \
|
||||
postgresql-client \
|
||||
&& python -m pip install git+https://gitlab.com/mailman/mailmanclient.git \
|
||||
git+https://gitlab.com/mailman/postorius.git \
|
||||
git+https://gitlab.com/mailman/django-mailman3.git \
|
||||
git+https://gitlab.com/mailman/hyperkitty.git \
|
||||
whoosh \
|
||||
uwsgi \
|
||||
psycopg2
|
||||
wget \
|
||||
postgresql-client
|
||||
|
||||
RUN wget -O mailmanclient.zip https://gitlab.com/mailman/mailmanclient/repository/archive.zip?ref=master \
|
||||
&& wget -O postorius.zip https://gitlab.com/mailman/postorius/repository/archive.zip?ref=master \
|
||||
&& wget -O django-mailman3.zip https://gitlab.com/mailman/django-mailman3/repository/archive.zip?ref=master \
|
||||
&& wget -O hyperkitty.zip https://gitlab.com/mailman/hyperkitty/repository/archive.zip?ref=master \
|
||||
&& python -m pip install mailmanclient.zip \
|
||||
postorius.zip \
|
||||
django-mailman3.zip \
|
||||
hyperkitty.zip \
|
||||
whoosh \
|
||||
uwsgi \
|
||||
psycopg2 \
|
||||
dj-database-url \
|
||||
pymysql \
|
||||
&& rm mailmanclient.zip postorius.zip hyperkitty.zip django-mailman3.zip
|
||||
|
||||
ADD mailman-web /opt/mailman-web
|
||||
|
||||
|
||||
Reference in New Issue
Block a user