hotpocket/services/base/ops/bin/wait-for-cloud.sh
Tomek Wójcik b4338e2769
Some checks failed
CI / Checks (push) Failing after 13m2s
Release v1.0.0
2025-08-20 21:00:50 +02:00

19 lines
627 B
Bash
Executable File

#!/bin/bash
if [ -x "$(command -v 'wait-for-it')" ];then
if [ ! -z "${POSTGRES_HOSTPORT}" ];then
echo "Waiting for postgres at ${POSTGRES_HOSTPORT}..."
wait-for-it -t 60 "${POSTGRES_HOSTPORT}" && echo "postgres is up"
fi
if [ ! -z "${RABBITMQ_HOSTPORT}" ];then
echo "Waiting for rabbitmq at ${RABBITMQ_HOSTPORT}..."
wait-for-it -t 60 "${RABBITMQ_HOSTPORT}" && echo "rabbitmq is up"
fi
if [ ! -z "${KEYCLOAK_HOSTPORT}" ];then
echo "Waiting for keycloak at ${KEYCLOAK_HOSTPORT}..."
wait-for-it -t 60 "${KEYCLOAK_HOSTPORT}" && echo "keycloak is up"
fi
fi