From 33b61bcfd5054f25792cb045807daf2d2f4e67fc Mon Sep 17 00:00:00 2001 From: Samuel Hassine Date: Tue, 2 Jul 2019 07:34:38 +0200 Subject: [PATCH] Docker compose fix in case of retrying --- opencti-docker/integration/entrypoint.sh | 5 +++++ opencti-docker/worker/entrypoint.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/opencti-docker/integration/entrypoint.sh b/opencti-docker/integration/entrypoint.sh index 58ffb9977237..d1221f6a5410 100755 --- a/opencti-docker/integration/entrypoint.sh +++ b/opencti-docker/integration/entrypoint.sh @@ -17,6 +17,11 @@ do sleep 2 done +while ! nc -z opencti ${OPENCTI_PORT}; do + echo "Waiting OpenCTI GraphQL to launch..." + sleep 2 +done + # Replace the token in the configuration cd /opt/opencti/integration cp config.yml.docker.sample config.yml.sample diff --git a/opencti-docker/worker/entrypoint.sh b/opencti-docker/worker/entrypoint.sh index 69228205f870..60de927a3c5f 100755 --- a/opencti-docker/worker/entrypoint.sh +++ b/opencti-docker/worker/entrypoint.sh @@ -14,6 +14,11 @@ do sleep 2 done +while ! nc -z opencti ${OPENCTI_PORT}; do + echo "Waiting OpenCTI GraphQL to launch..." + sleep 2 +done + # Replace the token in the configuration cd /opt/opencti/worker cp config.yml.docker.sample config.yml.sample