fix(postgres): use POSTGRES_DB in health checks
This commit is contained in:
parent
dd02701b21
commit
91f709f4fe
20
RELEASE_NOTES_v2.2.41.md
Normal file
20
RELEASE_NOTES_v2.2.41.md
Normal file
@ -0,0 +1,20 @@
|
||||
# Release Notes v2.2.41
|
||||
|
||||
Dato: 3. marts 2026
|
||||
|
||||
## Fix: Postgres healthcheck støj i logs
|
||||
- Opdateret healthcheck til at bruge korrekt database-navn (`POSTGRES_DB`) i stedet for default database.
|
||||
- Løser gentagne loglinjer af typen: `FATAL: database "bmc_hub" does not exist` på installationer hvor databasen hedder noget andet (fx `hubdb_v2`).
|
||||
|
||||
## Ændrede filer
|
||||
- `docker-compose.prod.yml`
|
||||
- `docker-compose.yml`
|
||||
- `updateto.sh`
|
||||
- `VERSION`
|
||||
|
||||
## Tekniske noter
|
||||
- Healthcheck er ændret fra:
|
||||
- `pg_isready -U <user>`
|
||||
- Til:
|
||||
- `pg_isready -U <user> -d <db>`
|
||||
- `updateto.sh` bruger nu også `-d "$POSTGRES_DB"` i venteløkke for postgres.
|
||||
@ -20,7 +20,7 @@ services:
|
||||
- "${POSTGRES_BIND_ADDR:-127.0.0.1}:${POSTGRES_PORT:-5432}:5432"
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@ -16,7 +16,7 @@ services:
|
||||
- "${POSTGRES_PORT:-5433}:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bmc_hub}"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-bmc_hub} -d ${POSTGRES_DB:-bmc_hub}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
@ -131,7 +131,7 @@ if [ "${RUN_MIGRATIONS:-false}" = "true" ]; then
|
||||
fi
|
||||
|
||||
for i in {1..30}; do
|
||||
if podman exec bmc-hub-postgres-prod pg_isready -U "$POSTGRES_USER" >/dev/null 2>&1; then
|
||||
if podman exec bmc-hub-postgres-prod pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
echo "⏳ Venter på postgres... ($i/30)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user