From 40c55620348d70c19ee92bf00dab0d2c3bf8b96d Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Thu, 24 Sep 2026 10:50:51 +0200 Subject: [PATCH] Check Komodo actually started and point KOMODO_HOST at the container --- tools/addon/komodo.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/addon/komodo.sh b/tools/addon/komodo.sh index 69765ddf6..bbab93a0f 100644 --- a/tools/addon/komodo.sh +++ b/tools/addon/komodo.sh @@ -199,6 +199,7 @@ function install() { sed -i "s/^KOMODO_INIT_ADMIN_PASSWORD=changeme/KOMODO_INIT_ADMIN_PASSWORD=${ADMIN_PASSWORD}/" "$COMPOSE_ENV" sed -i "s/^KOMODO_WEBHOOK_SECRET=.*/KOMODO_WEBHOOK_SECRET=${WEBHOOK_SECRET}/" "$COMPOSE_ENV" sed -i "s/^KOMODO_JWT_SECRET=.*/KOMODO_JWT_SECRET=${JWT_SECRET}/" "$COMPOSE_ENV" + sed -i "s|^KOMODO_HOST=.*|KOMODO_HOST=http://${LOCAL_IP}:${DEFAULT_PORT}|" "$COMPOSE_ENV" msg_ok "Configured environment" msg_info "Starting ${APP}" @@ -214,7 +215,16 @@ function install() { } >>~/komodo.creds echo "" - msg_ok "${APP} is reachable at: ${BL}http://${LOCAL_IP}:${DEFAULT_PORT}${CL}" + msg_info "Waiting for ${APP} to answer" + for _ in $(seq 1 60); do + curl -fsS --max-time 3 "http://127.0.0.1:${DEFAULT_PORT}" >/dev/null 2>&1 && break + sleep 3 + done + if curl -fsS --max-time 3 "http://127.0.0.1:${DEFAULT_PORT}" >/dev/null 2>&1; then + msg_ok "${APP} is reachable at: ${BL}http://${LOCAL_IP}:${DEFAULT_PORT}${CL}" + else + msg_error "${APP} did not come up - check: docker logs komodo-core-1" + fi echo "" echo -e " Komodo Credentials" echo -e " =================="