add healthcheck for http services

This commit is contained in:
Thomas Sänger
2018-10-16 21:38:12 +02:00
parent 28a5f8574d
commit 39272ab05c
8 changed files with 27 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ RUN mkdir -p /app
WORKDIR /app
COPY requirements-prod.txt requirements.txt
RUN apk add --no-cache openssl \
RUN apk add --no-cache openssl curl \
&& apk add --no-cache --virtual build-dep openssl-dev libffi-dev python-dev build-base \
&& pip install -r requirements.txt \
&& apk del --no-cache build-dep
@@ -20,3 +20,5 @@ EXPOSE 80/tcp
VOLUME ["/data"]
CMD ["/start.sh"]
HEALTHCHECK CMD curl -f -L http://localhost/ui || exit 1

View File

@@ -1,6 +1,6 @@
FROM alpine:3.8
RUN apk add --no-cache certbot nginx nginx-mod-mail openssl \
RUN apk add --no-cache certbot nginx nginx-mod-mail openssl curl \
python py-jinja2 py-requests-toolbelt py-pip \
&& pip install --upgrade pip \
&& pip install idna
@@ -12,3 +12,5 @@ EXPOSE 80/tcp 443/tcp 110/tcp 143/tcp 465/tcp 587/tcp 993/tcp 995/tcp 25/tcp 100
VOLUME ["/certs"]
CMD /start.py
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1