2021-02-23 13:08:17 +01:00
|
|
|
ARG PYTHON_VERSION=3.9
|
2021-02-11 18:15:24 +01:00
|
|
|
|
|
|
|
FROM docker.io/python:${PYTHON_VERSION}-slim as builder
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
libffi-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libwebp-dev \
|
|
|
|
libxml++2.6-dev \
|
|
|
|
libxslt1-dev \
|
|
|
|
zlib1g-dev \
|
2021-03-26 13:28:12 +01:00
|
|
|
openssl \
|
2021-02-11 18:15:24 +01:00
|
|
|
git \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY synapse /synapse/synapse/
|
2022-03-17 13:07:38 +01:00
|
|
|
COPY MANIFEST.in README.rst setup.py /synapse/
|
2021-02-11 18:15:24 +01:00
|
|
|
|
|
|
|
RUN pip install --prefix="/install" --no-warn-script-location \
|
|
|
|
/synapse[all] \
|
|
|
|
'git+https://github.com/maunium/synapse-simple-antispam#egg=synapse-simple-antispam' \
|
2022-02-20 23:33:51 +01:00
|
|
|
'git+https://github.com/devture/matrix-synapse-shared-secret-auth@2.0.2#egg=shared_secret_authenticator'
|
2021-02-11 18:15:24 +01:00
|
|
|
|
|
|
|
FROM docker.io/python:${PYTHON_VERSION}-slim
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
curl \
|
|
|
|
libjpeg62-turbo \
|
|
|
|
libpq5 \
|
|
|
|
libwebp6 \
|
|
|
|
xmlsec1 \
|
|
|
|
libjemalloc2 \
|
2021-03-26 13:28:12 +01:00
|
|
|
openssl \
|
2021-02-11 18:15:24 +01:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY --from=builder /install /usr/local
|
2020-11-18 00:12:41 +01:00
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
ENV LD_PRELOAD="/usr/lib/x86_64-linux-gnu/libjemalloc.so.2"
|
|
|
|
|
|
|
|
ENTRYPOINT ["python3", "-m", "synapse.app.homeserver"]
|
|
|
|
CMD ["--keys-directory", "/data", "-c", "/data/homeserver.yaml"]
|
2021-02-11 18:15:24 +01:00
|
|
|
|
2022-02-20 23:31:50 +01:00
|
|
|
HEALTHCHECK --start-period=5s --interval=1m --timeout=5s \
|
2021-02-11 18:15:24 +01:00
|
|
|
CMD curl -fSs http://localhost:8008/health || exit 1
|