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.txt requirements.txt
RUN apk add --no-cache git \
RUN apk add --no-cache git curl \
&& pip install -r requirements.txt
COPY server.py ./server.py
@@ -16,3 +16,5 @@ RUN python setup.py https://github.com/mailu/mailu /data
EXPOSE 80/tcp
CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload main:app
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1