From 1dae9faac15689b300e5fbec8fa16a7bea88ef0b Mon Sep 17 00:00:00 2001 From: Joshua Wright Date: Wed, 14 Aug 2024 16:02:04 -0400 Subject: [PATCH] Adjust RITA container dependency to validate health status of ClickHouse (#19) * Adjust RITA container dependency to validate health status of ClickHouse before launch; adjust HEALTHCHECK timing for ClickHouse to minimize startup delay * Update docker-compose.prod.yml Co-Authored-By: Liza Tsibur --------- Co-authored-by: Naomi Kramer Co-authored-by: Liza Tsibur --- docker-compose.prod.yml | 7 ++++--- docker-compose.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index e3effe9..f4d68bf 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -7,7 +7,8 @@ services: image: ghcr.io/activecm/rita:latest build: . depends_on: - - clickhouse + clickhouse: + condition: service_healthy volumes: - ${CONFIG_FILE:-/etc/rita/config.hjson}:/config.hjson - ${CONFIG_DIR:-/etc/rita}/http_extensions_list.csv:/http_extensions_list.csv @@ -45,8 +46,8 @@ services: container_name: rita-clickhouse healthcheck: test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1 - interval: 5s - start_period: 5s + interval: 3s + start_period: 1s retries: 30 restart: unless-stopped expose: diff --git a/docker-compose.yml b/docker-compose.yml index 988cffe..c755cac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,8 @@ services: # image: build: . depends_on: - - clickhouse + clickhouse: + condition: service_healthy volumes: - ${CONFIG_FILE:-/etc/rita/config.hjson}:/config.hjson - ${CONFIG_DIR:-/etc/rita}/http_extensions_list.csv:/deployment/http_extensions_list.csv @@ -41,8 +42,8 @@ services: container_name: clickhouse healthcheck: test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1 - interval: 5s - start_period: 5s + interval: 3s + start_period: 1s retries: 30 restart: unless-stopped ports: