From cec752b998883882f931b9a9f51c1c31e2656579 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Fri, 14 Jul 2023 14:15:01 +0200 Subject: [PATCH] Listen on localhost with postgresql --- .envrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.envrc b/.envrc index d4374b8..e54128e 100644 --- a/.envrc +++ b/.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 }