Listen on localhost with postgresql
This commit is contained in:
parent
0b61c4a23f
commit
cec752b998
2
.envrc
2
.envrc
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue