From 5dc5667dd664797386dd17c5e0c8efd6ec45a781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 1 Mar 2023 14:15:23 +0100 Subject: [PATCH] explicitly wait pollingAgent container until healthy --- terraform/modules/compute_plane/main.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/terraform/modules/compute_plane/main.tf b/terraform/modules/compute_plane/main.tf index b167c92c1..76ed669f5 100644 --- a/terraform/modules/compute_plane/main.tf +++ b/terraform/modules/compute_plane/main.tf @@ -97,6 +97,9 @@ resource "docker_container" "polling_agent" { source = module.local_storage.object_volume } + wait = true + wait_timeout = 20 + healthcheck { test = ["CMD", "bash", "-c", "exec 3<>\"/dev/tcp/localhost/1080\" && echo -en \"GET /liveness HTTP/1.1\r\nHost: localhost:1080\r\nConnection: close\r\n\r\n\">&3 && grep Healthy <&3 &>/dev/null || exit 1"] interval = "5s"