From 5a0502c6e9f73a06df805e0f5e9241e8e1ff7813 Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Tue, 29 Apr 2025 10:18:09 +0200
Subject: [PATCH] fix

---
 infra/jobs/station/dsconfig.levant.nomad | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/infra/jobs/station/dsconfig.levant.nomad b/infra/jobs/station/dsconfig.levant.nomad
index b8317d4fc..ebb5c4f3f 100644
--- a/infra/jobs/station/dsconfig.levant.nomad
+++ b/infra/jobs/station/dsconfig.levant.nomad
@@ -15,15 +15,22 @@ job "dsconfig" {
       mode = "bridge"
     }
 
-    task "dsconfig" {
+    task "wait-for-db" {
+      lifecycle {
+        hook    = "prestart"
+        sidecar = false
+      }
       driver = "docker"
 
-      restart {
-        interval = "1h"
-        attempts = 10
-        delay    = "1m"
-        mode     = "delay"
+      config {
+        image   = "[[ $.registry.astron.url ]]/busybox:latest"
+        command = "sh"
+        args    = ["-c", "while ! nc -z tango.service.consul 10000; do sleep 1; done"]
       }
+    }
+
+    task "dsconfig" {
+      driver = "docker"
 
       artifact {
         source      = "${NOMAD_META_cdb_json_url}"
-- 
GitLab