From c1d2592d7eda9e8fe9109071d62403dcb822b8d3 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Thu, 19 Dec 2024 11:05:04 +0100 Subject: [PATCH] add healthcheck --- webhook_application_dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webhook_application_dockerfile b/webhook_application_dockerfile index 5e22a3b..e4d6b6a 100644 --- a/webhook_application_dockerfile +++ b/webhook_application_dockerfile @@ -30,8 +30,10 @@ RUN wget https://github.com/adnanh/webhook/releases/download/${VERSION}/webhook- RUN echo "- id: whoami-webhook" > hooks.yaml \ && echo " execute-command: 'whoami'" >> hooks.yaml -EXPOSE 9000 - USER webhook +EXPOSE 9000 + +HEALTHCHECK --timeout=4s CMD curl --silent --fail http://127.0.0.1:9000/ || exit 1 + CMD [ "./webhook", "-hooks", "hooks.yaml", "-verbose" ]