From 4dfc15fffd32aafb0ebf93fa06fc031af9321413 Mon Sep 17 00:00:00 2001 From: shimun Date: Tue, 6 Oct 2020 22:49:08 +0200 Subject: [PATCH] healthchecks --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 567940c..8be0132 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]