Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 19364ad5c2 |
@@ -439,6 +439,19 @@ docker volume rm dyolink_postgres_data_prod
|
||||
|
||||
Add `"insecure-registries": ["wixur.ir:3000"]` to `/etc/docker/daemon.json` and restart Docker.
|
||||
|
||||
### `connection reset by peer` while pulling `:v*` from Gitea
|
||||
|
||||
`docker login` succeeded, then `compose pull` failed on a frontend/backend manifest or layer from `wixur.ir:3000`. Auth is fine — the Windows Gitea registry dropped the TCP connection (common right after a large push, or when both images pull in parallel).
|
||||
|
||||
Images are already in the registry. Re-run only the **deploy** job, or on the VPS:
|
||||
|
||||
```bash
|
||||
cd /opt/dyolink/infrastructure
|
||||
./scripts/prod-remote-deploy.sh v1.0.2
|
||||
```
|
||||
|
||||
`prod-remote-deploy.sh` pulls backend then frontend with retries. If every attempt RSTs, check Gitea is up and `insecure-registries` includes `wixur.ir:3000`.
|
||||
|
||||
### View logs
|
||||
|
||||
```bash
|
||||
|
||||
@@ -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