From e6911a184cf7eec918f1c775d692d0517ac5e30d Mon Sep 17 00:00:00 2001 From: default Date: Fri, 5 Jun 2026 23:59:32 +0000 Subject: [PATCH] fix(deploy): use --force-recreate on docker compose up The previous attempt's `docker compose down` removed the project's network, but on the subsequent `docker compose up`, the postgrest container was being recreated rather than created from scratch, and its network attachment still pointed to the now-orphaned old network ID. The new db/minio containers attached to the freshly-created network fine; only postgrest failed with 'network ... not found'. `-d --force-recreate` tells docker compose to throw away any existing container state and build from scratch, eliminating stale network references. --- .gitea/workflows/deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 5aee9ad..29535c8 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -50,7 +50,9 @@ jobs: echo "MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}" echo "POSTGREST_JWT_SECRET=${POSTGREST_JWT_SECRET}" } >> .env - docker compose up -d db postgrest minio minio_init + # Bring the stack up fresh — --force-recreate ensures no stale + # network/container references from prior failed attempts + docker compose up -d --force-recreate db postgrest minio minio_init # Wait for Postgres healthcheck for i in $(seq 1 30); do if docker compose exec -T db pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" > /dev/null 2>&1; then