mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
nix: specify PGUSER (#25546)
sg adds a default PGUSER=sourcegraph. However, our auto database support in nix uses the current user since it is via a unix socket.
This commit is contained in:
parent
269df705d9
commit
31e0e1f5b4
@ -11,6 +11,7 @@ export PGHOST="${SG_DATA_DIR:-$HOME/.sourcegraph}/postgres"
|
||||
export PGDATA="${PGHOST}/${PGVER}"
|
||||
export PGDATABASE=postgres
|
||||
export PGDATASOURCE="postgresql:///postgres?host=${PGHOST}"
|
||||
export PGUSER="${USER}"
|
||||
|
||||
if [ ! -d "$PGHOST" ]; then
|
||||
mkdir -p "$PGHOST"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user