identity-service/bin/entrypoint.sh
Piotr Biernat 7adf3b9512
All checks were successful
continuous-integration/drone/push Build is passing
Refactor
2023-04-16 17:28:33 +02:00

29 lines
502 B
Bash
Executable File

#!/usr/bin/env sh
set +e
waitForService()
{
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
status=$?
while [ $status != 0 ]
do
echo "[x] wating for $1..."
sleep 1
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
status=$?
done
}
waitForService "postgres-db:5432"
waitForService "api-logger:24224"
waitForService "api-registry:8500"
waitForService "api-gateway:5672"
# waitForService "api-eventbus:5672"
# run migrations
migrate.sh
# set -euo pipefail
exec "$@"