From 18b3104cc372ad19cb16d47b09f6a5aa3007bfc4 Mon Sep 17 00:00:00 2001 From: Chris Riccomini Date: Fri, 26 Jan 2024 10:28:24 -0800 Subject: [PATCH] Update docker-compose.yml --- tests/docker-compose.yml | 75 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 5 deletions(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 6ac0eea..230f734 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,21 +1,22 @@ -version: '3.9' +version: '3.8' services: postgres: - container_name: recap_postgres_test image: postgres:14 - restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: password POSTGRES_DB: testdb ports: - "5432:5432" + healthcheck: + test: ["CMD", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 mysql: image: mysql:8.0 - container_name: recap_mysql_test - restart: always environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: testdb @@ -23,3 +24,67 @@ services: MYSQL_PASSWORD: password ports: - "3306:3306" + healthcheck: + test: ["CMD", "mysqladmin", "ping", "--silent"] + interval: 10s + timeout: 5s + retries: 5 + + bigquery: + image: ghcr.io/criccomini/bigquery-emulator:0.4.3-envvar + environment: + BIGQUERY_EMULATOR_PROJECT: test_project + BIGQUERY_EMULATOR_DATASET: test_dataset + ports: + - "9050:9050" + + zookeeper: + image: confluentinc/cp-zookeeper:latest + ports: + - "2181:2181" + environment: + ZOOKEEPER_CLIENT_PORT: 2181 + healthcheck: + test: ["CMD", "echo", "ruok", "|", "nc", "localhost", "2181"] + interval: 10s + timeout: 5s + retries: 5 + + kafka: + image: confluentinc/cp-kafka:latest + ports: + - "9092:9092" + environment: + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092 + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 + depends_on: + - zookeeper + healthcheck: + test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"] + interval: 10s + timeout: 5s + retries: 5 + + schema-registry: + image: confluentinc/cp-schema-registry:latest + ports: + - "8081:8081" + environment: + SCHEMA_REGISTRY_HOST_NAME: schema-registry + SCHEMA_REGISTRY_LISTENERS: http://schema-registry:8081 + SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: zookeeper:2181 + SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://kafka:9092 + depends_on: + - kafka + - zookeeper + healthcheck: + test: ["CMD-SHELL", "curl -f http://schema-registry:8081/"] + interval: 10s + timeout: 5s + retries: 5 + + hive-metastore: + image: ghcr.io/criccomini/hive-metastore-standalone:latest + ports: + - "9083:9083"