Content pfp
Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions

Michael Pfister pfp
Michael Pfister
@pfista
has anyone setup vercel + neon with both RLS and branching enabled for preview deployments?
1 reply
1 recast
8 reactions

pugson pfp
pugson
@pugson
@matthewmorek did
1 reply
0 recast
1 reaction

Michael Pfister pfp
Michael Pfister
@pfista
ayyyy @matthewmorek been a while!
1 reply
0 recast
2 reactions

matt ๐Ÿ’ญ pfp
matt ๐Ÿ’ญ
@matthewmorek
what's up, dude! been a while, yeah! no RLS (that's just a technicality), but I've got neon branches + vercel previews, auto deployment and auto-pruning. no github workflows necessary (other than running migrations, if you need that) unless you have a very sophisticated setup, I suggest you start with the official neon vercel integration: https://vercel.com/marketplace/neon they should set it all up for ya but... i also have some custom secret recipes using github workflows, with manual per project deployment pipeline for monorepos...
1 reply
0 recast
2 reactions

Michael Pfister pfp
Michael Pfister
@pfista
Ty ty, yes I also got it working without RLS I need RLS though, and the rls url is different from the autogen url neon adds to vercel env
1 reply
0 recast
1 reaction

matt ๐Ÿ’ญ pfp
matt ๐Ÿ’ญ
@matthewmorek
you mean pooled/unpooled connection string?
1 reply
0 recast
2 reactions

Michael Pfister pfp
Michael Pfister
@pfista
No, so normally the "admin" database url is `DATABASE_URL` With RLS, you need a separate URL that you pass in a jwt with it for the user, called `DATABASE_AUTHENTICATED_URL` I can get this working on static branches for RLS, but I want to have a dynamic db auth url added to each preview deployment
1 reply
0 recast
2 reactions

matt ๐Ÿ’ญ pfp
matt ๐Ÿ’ญ
@matthewmorek
in this case you need to eject from the default Neon integration and go the CI/CD route. use Vercel CLI and Neon CLI to manually Neon branch env settings and URLs from Neon per build, which you then manually deploy to Vercel (tarball). this way you bypass the need to sync env between Neon and Vercel and you do everything in GitHub Actions.
1 reply
0 recast
3 reactions

Michael Pfister pfp
Michael Pfister
@pfista
ah damn, good idea ok thanks man!
0 reply
0 recast
2 reactions