add healthcheck for http services
This commit is contained in:
@@ -4,7 +4,7 @@ RUN mkdir -p /app
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements-prod.txt requirements.txt
|
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 \
|
&& apk add --no-cache --virtual build-dep openssl-dev libffi-dev python-dev build-base \
|
||||||
&& pip install -r requirements.txt \
|
&& pip install -r requirements.txt \
|
||||||
&& apk del --no-cache build-dep
|
&& apk del --no-cache build-dep
|
||||||
@@ -20,3 +20,5 @@ EXPOSE 80/tcp
|
|||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ui || exit 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM alpine:3.8
|
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 \
|
python py-jinja2 py-requests-toolbelt py-pip \
|
||||||
&& pip install --upgrade pip \
|
&& pip install --upgrade pip \
|
||||||
&& pip install idna
|
&& 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"]
|
VOLUME ["/certs"]
|
||||||
|
|
||||||
CMD /start.py
|
CMD /start.py
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FROM python:3-alpine
|
|||||||
COPY requirements.txt /requirements.txt
|
COPY requirements.txt /requirements.txt
|
||||||
|
|
||||||
RUN pip install -r /requirements.txt \
|
RUN pip install -r /requirements.txt \
|
||||||
&& apk add --no-cache nginx \
|
&& apk add --no-cache nginx curl \
|
||||||
&& mkdir /run/nginx
|
&& mkdir /run/nginx
|
||||||
|
|
||||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
@@ -11,4 +11,8 @@ COPY . /docs
|
|||||||
|
|
||||||
RUN sphinx-build /docs /build
|
RUN sphinx-build /docs /build
|
||||||
|
|
||||||
CMD nginx -g "daemon off;"
|
EXPOSE 80/tcp
|
||||||
|
|
||||||
|
CMD nginx -g "daemon off;"
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
|
|
||||||
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
&& apk add --no-cache radicale@testing py-dulwich@testing
|
&& apk add --no-cache radicale@testing py-dulwich@testing curl
|
||||||
|
|
||||||
COPY radicale.conf /radicale.conf
|
COPY radicale.conf /radicale.conf
|
||||||
|
|
||||||
@@ -9,3 +9,5 @@ EXPOSE 5232/tcp
|
|||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD radicale -f -S -C /radicale.conf
|
CMD radicale -f -S -C /radicale.conf
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost:5232/ || exit 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM alpine:3.8
|
FROM alpine:3.8
|
||||||
|
|
||||||
RUN apk add --no-cache python py-jinja2 rspamd rspamd-controller rspamd-proxy ca-certificates py-pip \
|
RUN apk add --no-cache python py-jinja2 rspamd rspamd-controller rspamd-proxy ca-certificates py-pip curl \
|
||||||
&& pip install --upgrade pip \
|
&& pip install --upgrade pip \
|
||||||
&& pip install tenacity
|
&& pip install tenacity
|
||||||
|
|
||||||
@@ -17,3 +17,5 @@ EXPOSE 11332/tcp 11334/tcp
|
|||||||
VOLUME ["/var/lib/rspamd"]
|
VOLUME ["/var/lib/rspamd"]
|
||||||
|
|
||||||
CMD /start.py
|
CMD /start.py
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost:11334/ || exit 1
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ RUN mkdir -p /app
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
RUN apk add --no-cache git \
|
RUN apk add --no-cache git curl \
|
||||||
&& pip install -r requirements.txt
|
&& pip install -r requirements.txt
|
||||||
|
|
||||||
COPY server.py ./server.py
|
COPY server.py ./server.py
|
||||||
@@ -16,3 +16,5 @@ RUN python setup.py https://github.com/mailu/mailu /data
|
|||||||
EXPOSE 80/tcp
|
EXPOSE 80/tcp
|
||||||
|
|
||||||
CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload main:app
|
CMD gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload main:app
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FROM php:7.2-apache
|
|||||||
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip
|
ENV RAINLOOP_URL https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
unzip python3 python3-jinja2 \
|
unzip python3 python3-jinja2 curl \
|
||||||
&& rm -rf /var/www/html/ \
|
&& rm -rf /var/www/html/ \
|
||||||
&& mkdir /var/www/html \
|
&& mkdir /var/www/html \
|
||||||
&& cd /var/www/html \
|
&& cd /var/www/html \
|
||||||
@@ -29,3 +29,5 @@ EXPOSE 80/tcp
|
|||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD /start.py
|
CMD /start.py
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ FROM php:7.2-apache
|
|||||||
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.7/roundcubemail-1.3.7-complete.tar.gz
|
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.3.7/roundcubemail-1.3.7-complete.tar.gz
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
zlib1g-dev \
|
zlib1g-dev curl \
|
||||||
&& docker-php-ext-install zip \
|
&& docker-php-ext-install zip \
|
||||||
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
|
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
|
||||||
&& rm -rf /var/www/html/ \
|
&& rm -rf /var/www/html/ \
|
||||||
@@ -28,3 +28,5 @@ EXPOSE 80/tcp
|
|||||||
VOLUME ["/data"]
|
VOLUME ["/data"]
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
|
||||||
|
HEALTHCHECK CMD curl -f -L http://localhost/ || exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user