From cf20442a7a8294701e082a629c9eab0d35a8148c Mon Sep 17 00:00:00 2001 From: t4ccer Date: Wed, 27 Apr 2022 12:53:06 -0600 Subject: [PATCH] Add `service.healthcheck.start_period` option --- docs/modules/ROOT/partials/NixOSOptions.adoc | 22 +++++++++++++++++++ .../service/docker-compose-service.nix | 6 +++++ 2 files changed, 28 insertions(+) diff --git a/docs/modules/ROOT/partials/NixOSOptions.adoc b/docs/modules/ROOT/partials/NixOSOptions.adoc index a12edb3..8e22a6a 100644 --- a/docs/modules/ROOT/partials/NixOSOptions.adoc +++ b/docs/modules/ROOT/partials/NixOSOptions.adoc @@ -707,6 +707,28 @@ Default:: No Example:: {blank} +== services..service.healthcheck.start_period + +See link:https://docs.docker.com/compose/compose-file/#healthcheck[Docker Compose#healthcheck] + +[discrete] +=== details + +Type:: string +Default:: ++ +---- +"0s" +---- + + +Example:: ++ +---- +"30s" +---- + + == services..service.healthcheck.test See link:https://docs.docker.com/compose/compose-file/#healthcheck[Docker Compose#healthcheck] diff --git a/src/nix/modules/service/docker-compose-service.nix b/src/nix/modules/service/docker-compose-service.nix index 039e8d7..0b307af 100644 --- a/src/nix/modules/service/docker-compose-service.nix +++ b/src/nix/modules/service/docker-compose-service.nix @@ -123,6 +123,12 @@ in example = "10s"; description = dockerComposeRef "healthcheck"; }; + service.healthcheck.start_period = mkOption { + type = str; + default = "0s"; + example = "30s"; + description = dockerComposeRef "healthcheck"; + }; service.healthcheck.retries = mkOption { type = int; default = 3;