Agregar configuración automática de autenticación PostgreSQL
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m3s

- Script 00_configure_auth.sh configura pg_hba.conf para usar md5
- Se ejecuta automáticamente en inicializaciones de BD
- Soluciona permanentemente problemas de autenticación con driver pg de Node.js
This commit is contained in:
2025-11-21 19:33:46 -06:00
parent f24f2373f9
commit a14ce46ab3

View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
echo "Configurando autenticación de PostgreSQL..."
# Eliminar configuración scram-sha-256 y agregar md5
# Esto asegura que las conexiones remotas funcionen correctamente
sed -i '/scram-sha-256/d' "$PGDATA/pg_hba.conf"
# Agregar configuración para conexiones md5 si no existe
if ! grep -q "host all all all md5" "$PGDATA/pg_hba.conf"; then
echo "host all all all md5" >> "$PGDATA/pg_hba.conf"
fi
echo "✓ Configuración de autenticación aplicada (md5)"