Skip to content

Commit 71fdf4d

Browse files
committed
fix: bootstrap NOLOGIN roles before seeding test users
InsForge Docker image is vanilla Postgres with no pre-created roles. Unlike Supabase (where supabase start creates anon/authenticated/service_role), we must explicitly run pgpm admin-users bootstrap to create the NOLOGIN base roles (anon, authenticated, project_admin) from pgpm.json config before the deploy SQL can GRANT to them.
1 parent a57d170 commit 71fdf4d

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ jobs:
7979
- name: Install pgpm CLI globally
8080
run: npm install -g pgpm
8181

82-
- name: Seed pg and app_user
82+
- name: Bootstrap roles and seed test users
8383
run: |
84+
# InsForge image is vanilla Postgres — no pre-created roles
85+
# (unlike Supabase where `supabase start` creates them)
86+
pgpm admin-users bootstrap --yes
8487
pgpm admin-users add --test --yes
8588
8689
- name: Test ${{ matrix.package }}

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ssh:
99
docker exec -it postgres /bin/bash
1010

1111
roles:
12+
pgpm admin-users bootstrap --yes
1213
pgpm admin-users add --test --yes
1314

1415
install:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ Built with [`insforge-test`](https://www.npmjs.com/package/insforge-test) — an
1616
```sh
1717
docker-compose up -d
1818
pnpm install
19+
make roles
1920
cd packages/hello-world
2021
pnpm test:watch
2122
```
2223

24+
> **Note:** Unlike Supabase (where `supabase start` pre-creates roles), the InsForge Docker image is vanilla Postgres. `make roles` runs `pgpm admin-users bootstrap` to create the `anon`, `authenticated`, and `project_admin` NOLOGIN roles before seeding test users.
25+
2326
## InsForge Roles
2427

2528
InsForge uses three built-in PostgreSQL roles:

0 commit comments

Comments
 (0)