Listen on localhost with postgresql

This commit is contained in:
Andreas Zweili 2023-07-14 14:15:01 +02:00
parent 0b61c4a23f
commit cec752b998
1 changed files with 1 additions and 1 deletions

2
.envrc
View File

@ -5,7 +5,7 @@ layout_postgres() {
export PGHOST="$PGDATA"
if [[ ! -d "$PGDATA" ]]; then
initdb
echo -e "listen_addresses = ''\nunix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
echo -e "listen_addresses = 'localhost'\nunix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
echo "CREATE DATABASE $USER;" | postgres --single -E postgres
fi
}