Files
synapse-app-mas/Dockerfile
2019-08-19 18:45:09 +02:00

46 lines
1.5 KiB
Docker

FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c67c933c546357617
MAINTAINER Authors name <support@cloudron.io>
RUN mkdir -p /app/code/nginx
WORKDIR /app/code
ENV MATRIXVERSION=v1.3.1
EXPOSE 8000
EXPOSE 3478/udp
# nginx
RUN rm /etc/nginx/sites-enabled/*
ADD nginx_matrix.conf /etc/nginx/sites-enabled/
RUN rm -rf /var/lib/nginx && ln -sf /app/data/nginx /var/lib/nginx
RUN rm -rf /var/log/nginx && ln -sf /run/nginx_log /var/log/nginx
# TURN
RUN apt update && apt-get install -y coturn
RUN sed -e 's,#TURNSERVER_ENABLED=1,TURNSERVER_ENABLED=1,' -i /etc/default/coturn && \
rm /etc/turnserver.conf && \
ln -s /app/data/turnserver.conf /etc/turnserver.conf
# Synapse
# a local copy is needed because of the mail templates, else the pip installation would suffice
RUN git clone https://github.com/matrix-org/synapse.git
RUN cd /app/code/synapse && git pull origin master
RUN apt-get install -y build-essential python3-dev libffi-dev \
python3-pip python-setuptools sqlite3 libxml2-dev \
libssl-dev python-virtualenv libjpeg-dev libxslt1-dev libldap2-dev libsasl2-dev && \
rm -rf /var/cache/apt /var/lib/apt/lists
RUN pip3 install --upgrade pip
RUN pip3 install --upgrade setuptools
RUN pip3 install psycopg2-binary python-ldap matrix-synapse-ldap3 lxml netaddr twisted jinja2 bleach bcrypt
RUN pip3 install https://github.com/matrix-org/synapse/archive/${MATRIXVERSION}.tar.gz
RUN chown -R www-data.www-data /app/code
ADD start_matrix.sh /app/
CMD [ "/app/start_matrix.sh" ]