From b333988882e7a91bd0f2de09d4a17aaf196843e4 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Sat, 23 Dec 2023 08:38:29 -0700 Subject: [PATCH] Update start_dev_db.sh --- scripts/start_dev_db.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/start_dev_db.sh b/scripts/start_dev_db.sh index f192defa6..14e4b3011 100644 --- a/scripts/start_dev_db.sh +++ b/scripts/start_dev_db.sh @@ -2,6 +2,7 @@ export PGDATA="$PWD/dev_pgdata" export PGHOST=$PWD +export PGUSER=postgres export LEMMY_DATABASE_URL="postgresql://lemmy:password@/lemmy?host=$PWD" # If cluster exists, stop the server and delete the cluster @@ -20,5 +21,6 @@ initdb --username=postgres --auth=trust --no-instructions pg_ctl start --options="-c listen_addresses= -c unix_socket_directories=$PWD" > /dev/null # Setup database -psql -c "CREATE USER lemmy WITH PASSWORD 'password' SUPERUSER;" -U postgres -psql -c "CREATE DATABASE lemmy WITH OWNER lemmy;" -U postgres +psql -c "CREATE USER lemmy WITH PASSWORD 'password' SUPERUSER;" +psql -c "CREATE DATABASE lemmy WITH OWNER lemmy;" +export PGDATABASE=lemmy