basket-service/bin/entrypoint.sh

37 lines
756 B
Bash
Raw Permalink Normal View History

2022-12-07 02:43:11 +01:00
#!/usr/bin/env sh
set +e
waitForService()
{
2022-12-17 08:11:05 +01:00
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
2022-12-07 02:43:11 +01:00
status=$?
while [ $status != 0 ]
do
echo "[x] wating for $1..."
sleep 1
2022-12-17 08:11:05 +01:00
wait-for-it.sh $1 -t 2 1>/dev/null 2>&1
2022-12-07 02:43:11 +01:00
status=$?
done
}
2024-12-05 16:56:54 +01:00
update-resolv
2024-04-17 19:13:59 +02:00
update-ca-certificates
2024-12-05 16:56:54 +01:00
waitForService "api-registry:8501"
waitForService "esb.service.ego.io:5672"
waitForService "logger.service.ego.io:24224"
waitForService "postgresdb.service.ego.io:5432"
2024-07-20 19:20:44 +02:00
# waitForService "pricing.service.ego.io:443"
2024-12-05 16:56:54 +01:00
# waitForService "api-eventbus:5672"
# waitForService "api-logger:24224"
# waitForService "db-postgres:5432"
# waitForService "pricing-svc:443" #dev-disabled
register-service
2022-12-07 02:43:11 +01:00
2022-12-17 08:11:05 +01:00
# run migrations
migrate.sh
2022-12-07 02:43:11 +01:00
2022-12-17 08:11:05 +01:00
# set -euo pipefail
2022-12-07 02:43:11 +01:00
exec "$@"