2022-09-27 22:09:07 +02:00
|
|
|
# syntax=docker/dockerfile-upstream:1.4.3
|
2021-11-04 15:22:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
# build static assets (intermediate)
|
2022-09-27 22:09:07 +02:00
|
|
|
FROM base as static
|
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
COPY static/ /static/
|
2022-09-27 22:09:07 +02:00
|
|
|
|
|
|
|
RUN set -euxo pipefail \
|
2022-10-08 15:55:40 +02:00
|
|
|
; gzip -k9 /static/*.ico /static/*.txt \
|
|
|
|
; chmod a+rX-w -R /static
|
2021-11-04 15:22:12 +02:00
|
|
|
|
2021-11-17 22:00:04 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
# nginx image
|
2022-09-27 22:09:07 +02:00
|
|
|
FROM base
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
ARG VERSION
|
|
|
|
LABEL version=$VERSION
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
RUN set -euxo pipefail \
|
2022-10-14 14:34:58 +02:00
|
|
|
; apk add --no-cache certbot nginx nginx-mod-mail openssl
|
2017-09-24 13:09:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
COPY conf/ /conf/
|
|
|
|
COPY --from=static /static/ /static/
|
2017-09-24 17:50:10 +02:00
|
|
|
COPY *.py /
|
2017-09-24 13:09:12 +02:00
|
|
|
|
2022-10-08 15:55:40 +02:00
|
|
|
RUN echo $VERSION >/version
|
2021-09-02 20:46:56 +02:00
|
|
|
|
2018-04-21 14:46:01 +02:00
|
|
|
EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp 10025/tcp 10143/tcp
|
2022-09-27 22:09:07 +02:00
|
|
|
HEALTHCHECK --start-period=60s CMD curl -skfLo /dev/null http://localhost/health
|
2018-04-21 14:46:01 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
VOLUME ["/certs", "/overrides"]
|
2018-10-16 21:38:12 +02:00
|
|
|
|
2022-09-27 22:09:07 +02:00
|
|
|
CMD /start.py
|