hotpocket/services/base/ops/bin/wait-for-cloud.sh
Tomek Wójcik d909391ee6
Some checks failed
CI / Checks (push) Has been cancelled
Release v1.0.0rc1
2025-08-18 07:09:27 +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