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.
This commit is contained in:
@@ -50,7 +50,9 @@ jobs:
|
|||||||
echo "MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}"
|
echo "MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}"
|
||||||
echo "POSTGREST_JWT_SECRET=${POSTGREST_JWT_SECRET}"
|
echo "POSTGREST_JWT_SECRET=${POSTGREST_JWT_SECRET}"
|
||||||
} >> .env
|
} >> .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
|
# Wait for Postgres healthcheck
|
||||||
for i in $(seq 1 30); do
|
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
|
if docker compose exec -T db pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" > /dev/null 2>&1; then
|
||||||
|
|||||||
Reference in New Issue
Block a user