identity-service/bin/entrypoint.sh

30 lines
518 B
Bash
Raw 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
2024-12-05 16:59:08 +01:00
waitForService "api-registry:8501"
waitForService "api-logger:24224"
2024-12-05 16:59:08 +01:00
waitForService "db-postgres:5432"
register-service
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 "$@"