Issue(s) connecting to PostGres DB with Prisma

2 views
Skip to first unread message

RK

unread,
May 30, 2026, 1:25:52 PM (14 days ago) May 30
to NodeChef
Is it expected that setting a DATABASE_URL environment variable in the app dashboard won't override the DATABASE_URL that nodechef injects into the server environment?

I ask because I've been struggling with prisma connections to my postgres DB being rejected.  I eventually narrowed this down to it being an issue with SSL being required, but I struggled to enable that in production.  I tried setting the DATABASE_URL in the Environment Variables section of my app dashboard (to include "...?sslmode=require"), but that didn't work.  The app was still receiving the original DATABASE_URL value, with no `sslmode` param.

I eventually solved the problem by manually concatenating "?sslmode=require" on to the DATABASE_URL value in the code inside my app.  It works, but it's not ideal.

'Feels like I'm missing something obvious here.

Cheers,

- rwk
 
Reply all
Reply to author
Forward
0 new messages