From d7ef3f06d9c586f200a7791b39583d7e172bd2e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannik=20R=C3=B6del?= Date: Wed, 11 May 2022 18:11:39 +0200 Subject: [PATCH] Add a Docker health check Closes #6 --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 0e95564..eaa58f1 100644 --- a/flake.nix +++ b/flake.nix @@ -68,6 +68,12 @@ ${pkgs.coreutils}/bin/mkdir -p /var/tmp ${pkgs.lighttpd}/bin/lighttpd -Df ${packages.lighttpdConfig} '') ]; + Healthcheck = { + Test = [ "${pkgs.curl}/bin/curl" "--fail" "localhost" ]; + Interval = 30000000000; # 30 seconds + Timeout = 10000000000; # 10 seconds + Retries = 3; + }; }; };