Skip to content

Commit 6c022a8

Browse files
committed
Fix postgres users in CI
Also add "andrew", for local verification.
1 parent 8069ebd commit 6c022a8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

postgres/start.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@
44
}:
55
writeShellScriptBin "postgres-start" ''
66
[[ -d "$PGHOST" ]] || \
7-
${postgresql_18}/bin/initdb -D "$PGHOST/db"
7+
${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+
815
${postgresql_18}/bin/pg_ctl \
916
-D "$PGHOST/db" \
1017
-l "$PGHOST/log" \

0 commit comments

Comments
 (0)