From 65f124357b401ee86d040ed57c51bdda991681de Mon Sep 17 00:00:00 2001 From: Saiyan Abhishek <74703491+geeky-abhishek@users.noreply.github.com> Date: Wed, 4 Jan 2023 17:12:16 +0530 Subject: [PATCH] feat:healt checks added --- .../templates/compose-file.j2 | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/ansible_workspace_dir/roles/deploy-agridex-beckn/templates/compose-file.j2 b/ansible_workspace_dir/roles/deploy-agridex-beckn/templates/compose-file.j2 index 2fc696d..0545d5e 100644 --- a/ansible_workspace_dir/roles/deploy-agridex-beckn/templates/compose-file.j2 +++ b/ansible_workspace_dir/roles/deploy-agridex-beckn/templates/compose-file.j2 @@ -12,7 +12,12 @@ services: {% endif %} - + healthcheck: + test: curl --fail {{ docker_service_name }}_proxy || exit 1 + interval: 60s + retries: 5 + start_period: 20s + timeout: 10s expose: - {{ service_agridex_beckn_proxy_docker_port }} @@ -30,7 +35,12 @@ services: {% endif %} - + healthcheck: + test: curl --fail {{ docker_service_name }}_bap || exit 1 + interval: 60s + retries: 5 + start_period: 20s + timeout: 10s expose: - {{ service_agridex_beckn_bap_docker_port }} @@ -49,7 +59,12 @@ services: {% endif %} - + healthcheck: + test: curl --fail {{ docker_service_name }}_bg || exit 1 + interval: 60s + retries: 5 + start_period: 20s + timeout: 10s expose: - {{ service_agridex_beckn_bg_docker_port }} @@ -67,7 +82,12 @@ services: {% endif %} - + healthcheck: + test: curl --fail {{ docker_service_name }}_bpp || exit 1 + interval: 60s + retries: 5 + start_period: 20s + timeout: 10s expose: - {{ service_agridex_beckn_bpp_docker_port }}