chore: sync submodule state (parent ref update)
Made-with: Cursor
This commit is contained in:
22
docker/postgres-init/01-init-hba.sh
Executable file
22
docker/postgres-init/01-init-hba.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# Initialize pg_hba.conf for external connections
|
||||
|
||||
set -e
|
||||
|
||||
echo "Configuring PostgreSQL for external connections..."
|
||||
|
||||
# Create custom pg_hba.conf that allows password authentication from all hosts
|
||||
cat > /var/lib/postgresql/pg_hba_custom.conf <<EOF
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
local all all trust
|
||||
host all all 127.0.0.1/32 md5
|
||||
host all all ::1/128 md5
|
||||
host all all 0.0.0.0/0 md5
|
||||
host all all ::/0 md5
|
||||
EOF
|
||||
|
||||
# Update postgresql.conf to use custom hba file
|
||||
echo "host all all 0.0.0.0/0 md5" >> /var/lib/postgresql/data/pg_hba.conf
|
||||
echo "host all all ::/0 md5" >> /var/lib/postgresql/data/pg_hba.conf
|
||||
|
||||
echo "PostgreSQL configured for external connections"
|
||||
Reference in New Issue
Block a user