From 980417d77e07c00342c876e416e4493f095d6531 Mon Sep 17 00:00:00 2001 From: Strahil Nikolov Date: Fri, 31 May 2024 11:50:16 +0300 Subject: [PATCH] Add --health-on-failure Signed-off-by: Strahil Nikolov --- podman_compose.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/podman_compose.py b/podman_compose.py index 27a9a2d..3ad44b8 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1218,6 +1218,10 @@ async def container_to_args(compose, cnt, detached=True): if "start_period" in healthcheck: podman_args.extend(["--healthcheck-start-period", healthcheck["start_period"]]) + # check if any action must be taken on healtcheck failure + if "on_failure" in healthcheck: + podman_args.extend(["--health-on-failure", healthcheck["on_failure"]]) + # convert other parameters to string if "retries" in healthcheck: podman_args.extend(["--healthcheck-retries", str(healthcheck["retries"])])