From 106f59afa1c99eec4eac03c365d6cb6773e5073a Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 27 Dec 2021 16:08:55 +0100 Subject: [PATCH] docker: shift HEALTHCHECK to helper --- Dockerfile | 2 +- morss-helper | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4f6b8b5..6078c0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ USER 1000:1000 ENTRYPOINT ["/bin/sh", "/app/morss-helper"] CMD ["run"] -HEALTHCHECK CMD python -m morss.crawler http://localhost:${PORT:-8000}/ > /dev/null 2>&1 +HEALTHCHECK CMD ["check"] diff --git a/morss-helper b/morss-helper index 86f834a..724b727 100755 --- a/morss-helper +++ b/morss-helper @@ -12,6 +12,9 @@ elif [ "$@" = "reload" ]; then kill -s WINCH $pid kill -s TERM $pid +elif [ "$@" = "check" ]; then + python -m morss.crawler http://localhost:${PORT:-8000}/ > /dev/null 2>&1 + else morss $@