Error: self signed certificate in certificate chain #881
Replies: 4 comments
-
I had the same problem with Heroku, but I found this on the Drizzle Discord server and it worked:
|
Beta Was this translation helpful? Give feedback.
-
this worked for me too on a digital ocean managed db |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Managed to get it working with Supabase postgres (based on brianc/node-postgres#2558 (comment))
#.env
DATABASE_CA="-----BEGIN CERTIFICATE-----
MIIFfjCCA2agAwIBAgIUFzt/hG+Kx2L1z9uzChgojfS2lcQwDQYJKoZIhvcNAQEL
[...]
RF9269bOFWLNGVRYXAj9XdE7
-----END CERTIFICATE-----"
#drizzle.config.ts`
import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
out: './drizzle',
schema: './src/db/schema.ts',
dialect: 'postgresql',
dbCredentials: {
// using url doesn't work because it seems to override the ssl config
// url: process.env.DATABASE_URL!,
host: process.env.DATABASE_HOST!,
port: parseInt(process.env.DATABASE_PORT!),
user: process.env.DATABASE_USER!,
password: process.env.DATABASE_PASSWORD!,
database: process.env.DATABASE_NAME!,
ssl: { ca: process.env.DATABASE_CA! },
},
}); should work now |
Beta Was this translation helpful? Give feedback.
-
Hello, I am a new user of drizzle and trying to run the command for the first time to connect to my Supabase instance:
But I got this error
I am connecting drizzle to my Supabase instance, and my config file is like this
I have already enabled ssl, why does this happen and how to resolve this?
Beta Was this translation helpful? Give feedback.
All reactions