healthchecks

This commit is contained in:
shimun 2020-10-06 22:49:08 +02:00
parent 65140c1986
commit 4dfc15fffd
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -1,6 +1,6 @@
FROM rust:1.36-slim AS riffol_build
RUN cargo install --git https://github.com/shimunn/riffol.git --branch print_error
RUN cargo install --git https://github.com/shimunn/riffol.git --branch print_error --locked
FROM nginx:mainline
@ -12,7 +12,7 @@ ENV SEAF=/opt/seafile
COPY requirements.txt /tmp/requirements.txt
RUN apt update && apt install locales -y && apt install -y --no-install-recommends procps openssl python2.7 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools python3 sqlite3 python3 python3-pip python3-setuptools python3-ldap \
RUN apt update && apt install locales -y && apt install -y procps libmariadb-dev-compat openssl python2.7 sqlite3 python-mysqldb python-pil curl libjansson4 libfuse2 python-pip python-pip-whl python-setuptools python3 sqlite3 python3 python3-pip python3-setuptools python3-ldap \
&& rm -rf /var/lib/apt/lists/* /tmp/requirements.txt
RUN python3 -m pip install --upgrade pip && rm -r /root/.cache/pip
@ -47,4 +47,6 @@ RUN ulimit -n 30000 && mkdir -p $SEAF/pids && \
ENV SEAF_UPGRADE_INTERVAL=3
HEALTHCHECK --interval=5m --timeout=30s --start-period=30s CMD curl http://localhost:8000 && curl http://localhost:8082 && bash -c '[ $(curl --silent --output /dev/stderr --write-out "%{http_code}" http://localhost:8080) -eq 401 ]' || exit 1
ENTRYPOINT ["/usr/sbin/riffol", "-f", "/etc/riffol.conf"]