mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-26 12:17:14 +00:00
fix(deploy): retry transient image pull failures
This commit is contained in:
+12
-1
@@ -45,7 +45,18 @@ set -a
|
|||||||
. ./.env
|
. ./.env
|
||||||
set +a
|
set +a
|
||||||
|
|
||||||
docker compose pull postgres redis migrate plugin-runtime box core
|
for attempt in 1 2 3 4 5; do
|
||||||
|
if docker compose pull postgres redis migrate plugin-runtime box core; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if [ "$attempt" -eq 5 ]; then
|
||||||
|
echo "docker compose pull failed after $attempt attempts" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
delay=$((attempt * 10))
|
||||||
|
echo "docker compose pull failed (attempt $attempt/5); retrying in ${delay}s" >&2
|
||||||
|
sleep "$delay"
|
||||||
|
done
|
||||||
docker compose up -d postgres redis
|
docker compose up -d postgres redis
|
||||||
for _ in $(seq 1 60); do
|
for _ in $(seq 1 60); do
|
||||||
if docker compose exec -T postgres pg_isready -U langbot_operator -d langbot >/dev/null 2>&1; then break; fi
|
if docker compose exec -T postgres pg_isready -U langbot_operator -d langbot >/dev/null 2>&1; then break; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user