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 <liza@activecountermeasures.com>

---------

Co-authored-by: Naomi Kramer <naomi@activecountermeasures.com>
Co-authored-by: Liza Tsibur <liza@activecountermeasures.com>
This commit is contained in:
Joshua Wright
2024-08-14 16:02:04 -04:00
committed by GitHub
parent ffb694a5af
commit 1dae9faac1
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -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:
+4 -3
View File
@@ -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: