identity-service/bin/entrypoint.sh
2023-10-01 21:35:21 +02:00

24 lines
362 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 "db:5432"
waitForService "logger:24224"
# run migrations
migrate.sh
exec "$@"