We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8069ebd commit 6c022a8Copy full SHA for 6c022a8
1 file changed
postgres/start.nix
@@ -4,7 +4,14 @@
4
}:
5
writeShellScriptBin "postgres-start" ''
6
[[ -d "$PGHOST" ]] || \
7
- ${postgresql_18}/bin/initdb -D "$PGHOST/db"
+ ${postgresql_18}/bin/initdb \
8
+ --pgdata "$PGHOST/db" \
9
+ --username postgres
10
+
11
+ > "$PGHOST/db/pg_ident.conf"
12
+ echo "runner_can_be_postgres runner postgres" >> "$PGHOST/db/pg_ident.conf"
13
+ echo "andrew_can_be_postgres andrew postgres" >> "$PGHOST/db/pg_ident.conf"
14
15
${postgresql_18}/bin/pg_ctl \
16
-D "$PGHOST/db" \
17
-l "$PGHOST/log" \
0 commit comments