resolve failed handshake connection with https://wixur.ir:3000
This commit is contained in:
@@ -18,8 +18,33 @@ if ! grep -q '^REGISTRY_PREFIX=.\+' .env; then
|
||||
fi
|
||||
|
||||
export TAG
|
||||
|
||||
# Windows Gitea often RSTs concurrent or long pulls (connection reset by peer).
|
||||
# Pull one image at a time with backoff so a flake does not fail the whole tag.
|
||||
pull_one() {
|
||||
local service="$1"
|
||||
local attempt=1
|
||||
local max=5
|
||||
local delay=8
|
||||
while [ "$attempt" -le "$max" ]; do
|
||||
echo "Pulling $service :$TAG (attempt $attempt/$max)"
|
||||
if docker compose -f docker-compose.prod.yml --env-file .env pull "$service"; then
|
||||
return 0
|
||||
fi
|
||||
if [ "$attempt" -eq "$max" ]; then
|
||||
echo "Failed to pull $service after $max attempts"
|
||||
return 1
|
||||
fi
|
||||
echo "Pull of $service failed; retrying in ${delay}s..."
|
||||
sleep "$delay"
|
||||
delay=$((delay * 2))
|
||||
attempt=$((attempt + 1))
|
||||
done
|
||||
}
|
||||
|
||||
echo "Pulling backend/frontend :$TAG from Gitea (REGISTRY_PREFIX in .env)"
|
||||
docker compose -f docker-compose.prod.yml --env-file .env pull backend frontend
|
||||
pull_one backend
|
||||
pull_one frontend
|
||||
docker compose -f docker-compose.prod.yml --env-file .env up -d
|
||||
echo "=== Status ==="
|
||||
docker compose -f docker-compose.prod.yml --env-file .env ps
|
||||
|
||||
Reference in New Issue
Block a user