identity-service/bin/entrypoint.sh

27 lines
465 B
Bash
Raw Permalink Normal View History

2022-12-07 02:42:58 +01:00
#!/usr/bin/env sh
set +e
waitForService()
{
2022-12-17 06:31:35 +01:00
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
2022-12-07 02:42:58 +01:00
status=$?
while [ $status != 0 ]
do
echo "[x] wating for $1..."
sleep 1
2022-12-17 06:31:35 +01:00
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
2022-12-07 02:42:58 +01:00
status=$?
done
}
2024-07-20 19:18:49 +02:00
update-resolv # provided by stack - better approach - single copy
update-ca-certificates
waitForService "postgres-db:5432"
waitForService "api-logger:24224"
2022-12-07 02:42:58 +01:00
2022-12-17 06:31:35 +01:00
# run migrations
migrate.sh
2022-12-07 02:42:58 +01:00
exec "$@"