Files
OSIT-Mailman3/web/Dockerfile
Abhilash Raj ad1aaff624 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.
2017-04-06 17:06:12 -07:00

39 lines
1.1 KiB
Docker

FROM python:2.7
MAINTAINER Abhilash Raj
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y ruby-sass \
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
ADD assets/run.sh /opt/run.sh
WORKDIR /opt/mailman-web
EXPOSE 8000
ENV UWSGI_WSGI_FILE=wsgi.py UWSGI_HTTP=:8000 UWSGI_WORKERS=2 \
UWSGI_THREADS=4
CMD ["/opt/run.sh"]