From df7f728382ec271537844455a0efef1c5fc4ddd7 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 6 Sep 2023 17:06:57 +0200 Subject: [PATCH] Remove dependency on WaitForIt (#4260) Co-authored-by: Simon Dumas --- build.sbt | 3 +-- project/WaitForIt.scala | 16 ---------------- tests/docker/docker-compose.yml | 28 ++++++++++++++++------------ 3 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 project/WaitForIt.scala diff --git a/build.sbt b/build.sbt index 62b3f57abd..83857c6cf5 100755 --- a/build.sbt +++ b/build.sbt @@ -970,8 +970,7 @@ lazy val servicePackaging = { import com.typesafe.sbt.packager.docker.{DockerChmodType, DockerVersion} import com.typesafe.sbt.packager.universal.UniversalPlugin.autoImport.Universal Seq( - Universal / mappings += (WaitForIt.download(target.value) -> "bin/wait-for-it.sh"), - // docker publishing settings + // Docker publishing settings Docker / maintainer := "Nexus Team ", Docker / version := { if (isSnapshot.value) "latest" diff --git a/project/WaitForIt.scala b/project/WaitForIt.scala deleted file mode 100644 index 3de3d1b44a..0000000000 --- a/project/WaitForIt.scala +++ /dev/null @@ -1,16 +0,0 @@ -import sbt._ -import sbt.io.Using - -import java.io.File - -object WaitForIt { - - def download(target: File): File = { - val waitUrl = url("https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh") - val file = target / "wait-for-it.sh" - Using.urlInputStream(waitUrl) { is => - IO.transfer(is, file) - } - file - } -} diff --git a/tests/docker/docker-compose.yml b/tests/docker/docker-compose.yml index a34403ac0d..ee13aa1b8d 100644 --- a/tests/docker/docker-compose.yml +++ b/tests/docker/docker-compose.yml @@ -2,12 +2,18 @@ version: "3.3" services: delta: depends_on: - - keycloak - - elasticsearch - - blazegraph - - postgres - - storage-service - - minio + keycloak: + condition: service_started + elasticsearch: + condition: service_healthy + blazegraph: + condition: service_started + postgres: + condition: service_started + storage-service: + condition: service_started + minio: + condition: service_started environment: DELTA_PLUGINS: "/opt/docker/plugins/" DELTA_EXTERNAL_CONF: "/config/delta-postgres.conf" @@ -18,8 +24,6 @@ services: - '-c' - | ln -s /opt/docker/plugins/disabled/project-deletion.jar /opt/docker/plugins/project-deletion.jar && - /opt/docker/bin/wait-for-it.sh -s -t 0 postgres:5432 -- && - /opt/docker/bin/wait-for-it.sh -s -t 0 elasticsearch:9200 -- && /opt/docker/bin/delta-app -Xmx4G ports: - 8080:8080 @@ -83,10 +87,10 @@ services: ingest.geoip.downloader.enabled: "false" ELASTIC_PASSWORD: "password" healthcheck: - test: [ "CMD", "curl", "-f", "http://localhost:9200/_cluster/health" ] - interval: 30s - timeout: 20s - retries: 3 + test: [ "CMD", "curl", "-f", "http://elastic:password@localhost:9200/" ] + interval: 1s + timeout: 2s + retries: 60 ports: - 9200:9200 deploy: