From 53aac690df0fe49fecf01945ac190bcfa4a890f5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 23 Feb 2021 01:42:53 +0100 Subject: [PATCH] Add health check to dockerfile --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1051ce7..bcef289 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ RUN set -eu; \ python3 python3-pip python3-setuptools python3-wheel \ libpython3-dev \ make build-essential \ + netcat \ ; \ pip3 install -r requirements.txt; \ pip3 install -r build-requirements.txt; \ @@ -34,5 +35,7 @@ ENV SNIKKET_WEB_PYENV=/etc/snikket-web-portal/env.py ENV SNIKKET_WEB_PROSODY_ENDPOINT=http://127.0.0.1:5280/ +HEALTHCHECK CMD nc -zv ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_INTERFACE:-127.0.0.1} ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT:-5765} + ADD docker/entrypoint.sh /entrypoint.sh ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]