diff --git a/docker-compose/ci-cadence-dependencies.yml b/docker-compose/ci-cadence-dependencies.yml index daed9c71..42f18a2d 100644 --- a/docker-compose/ci-cadence-dependencies.yml +++ b/docker-compose/ci-cadence-dependencies.yml @@ -29,10 +29,16 @@ services: - "2181:2181" networks: - testing-network + healthcheck: + test: [ "CMD-SHELL", "echo ruok | nc -w 2 zookeeper 2181" ] + interval: 5s + timeout: 10s + retries: 3 kafka: image: wurstmeister/kafka:2.12-2.1.1 depends_on: - - zookeeper + zookeeper: + condition: service_healthy ports: - "9092:9092" environment: @@ -41,6 +47,12 @@ services: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 networks: - testing-network + healthcheck: + test: + [ "CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181" ] + interval: 1s + timeout: 60s + retries: 60 cadence: image: ubercadence/server:0.24.0-auto-setup ports: @@ -61,9 +73,12 @@ services: - "ES_VERSION=v7" - "KAFKA_SEEDS=kafka" depends_on: - - cassandra - - kafka - - elasticsearch + cassandra: + condition: service_started + kafka: + condition: service_healthy + elasticsearch: + condition: service_started networks: - testing-network cadence-admin-tools: diff --git a/docker-compose/ci-cadence-temporal-dependencies.yml b/docker-compose/ci-cadence-temporal-dependencies.yml index 825bf919..924e455b 100644 --- a/docker-compose/ci-cadence-temporal-dependencies.yml +++ b/docker-compose/ci-cadence-temporal-dependencies.yml @@ -78,10 +78,16 @@ services: - "2181:2181" networks: - testing-network + healthcheck: + test: [ "CMD-SHELL", "echo ruok | nc -w 2 zookeeper 2181" ] + interval: 5s + timeout: 10s + retries: 3 kafka: image: wurstmeister/kafka:2.12-2.1.1 depends_on: - - zookeeper + zookeeper: + condition: service_healthy ports: - "9092:9092" environment: @@ -90,6 +96,12 @@ services: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 networks: - testing-network + healthcheck: + test: + [ "CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181" ] + interval: 1s + timeout: 60s + retries: 60 cadence: image: ubercadence/server:0.24.0-auto-setup ports: @@ -110,9 +122,12 @@ services: - "ES_VERSION=v7" - "KAFKA_SEEDS=kafka" depends_on: - - cassandra - - kafka - - elasticsearch + cassandra: + condition: service_started + kafka: + condition: service_healthy + elasticsearch: + condition: service_started networks: - testing-network cadence-admin-tools: diff --git a/docker-compose/integ-dependencies.yml b/docker-compose/integ-dependencies.yml index d8145457..063f2897 100644 --- a/docker-compose/integ-dependencies.yml +++ b/docker-compose/integ-dependencies.yml @@ -78,10 +78,16 @@ services: - "2181:2181" networks: - testing-network + healthcheck: + test: [ "CMD-SHELL", "echo ruok | nc -w 2 zookeeper 2181" ] + interval: 5s + timeout: 10s + retries: 3 kafka: image: wurstmeister/kafka:2.12-2.1.1 depends_on: - - zookeeper + zookeeper: + condition: service_healthy ports: - "9092:9092" environment: @@ -90,6 +96,12 @@ services: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 networks: - testing-network + healthcheck: + test: + [ "CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181" ] + interval: 1s + timeout: 60s + retries: 60 cadence: image: ubercadence/server:0.24.0-auto-setup ports: @@ -110,9 +122,12 @@ services: - "ES_VERSION=v7" - "KAFKA_SEEDS=kafka" depends_on: - - cassandra - - kafka - - elasticsearch + cassandra: + condition: service_started + kafka: + condition: service_healthy + elasticsearch: + condition: service_started networks: - testing-network cadence-admin-tools: