forked from OpenSlides/openslides-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (31 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM python:3.10.3-slim-buster
RUN apt-get -y update && apt-get -y upgrade && \
apt-get install --no-install-recommends -y curl ncat git mime-support gcc libc-dev libpq-dev
WORKDIR /app
COPY requirements/ requirements/
RUN . requirements/export_datastore_commit.sh && pip install --no-cache-dir --requirement requirements/requirements_production.txt
RUN adduser --system --no-create-home appuser
USER appuser
EXPOSE 9002
EXPOSE 9003
ENV PYTHONPATH /app
COPY scripts scripts
COPY entrypoint.sh ./
COPY openslides_backend openslides_backend
COPY global global
ENV EMAIL_HOST postfix
ENV EMAIL_PORT 25
# ENV EMAIL_HOST_USER username
# ENV EMAIL_HOST_PASSWORD secret
# EMAIL_CONNECTION_SECURITY use NONE, STARTTLS or SSL/TLS
ENV EMAIL_CONNECTION_SECURITY NONE
ENV EMAIL_TIMEOUT 5
ENV EMAIL_ACCEPT_SELF_SIGNED_CERTIFICATE false
ENV DEFAULT_FROM_EMAIL [email protected]
LABEL org.opencontainers.image.title="OpenSlides Backend Service"
LABEL org.opencontainers.image.description="Backend service for OpenSlides which provides actions and presenters."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-backend"
HEALTHCHECK CMD curl --fail http://localhost:9002/system/action/health/ || curl --fail http://localhost:9003/system/presenter/health/ || exit 1
ENTRYPOINT ["./entrypoint.sh"]
CMD exec python -m openslides_backend