Skip to content

Commit

Permalink
Adjust RITA container dependency to validate health status of ClickHo…
Browse files Browse the repository at this point in the history
…use (#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 <[email protected]>

---------

Co-authored-by: Naomi Kramer <[email protected]>
Co-authored-by: Liza Tsibur <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent ffb694a commit 1dae9fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1dae9fa

Please sign in to comment.