Using SSL with deno deploy and supabase postgres direct connection
Hello 👋
I've been trying to setup an SSL connection with a supabase postgreSQL database using a direct connection. Unfortunaly it looks impossible to do it on Deno deploy. Am I right?
I've been trying my best to figure out a solution but it looks like I need to either use
--cert
or the environment variables SSL_CERT_FILE
and DENO_TLS_CA_STORE
to make it work locally. However, on deno deploy, both options can't work: --cert
isn't usable and DENO_TLS_CA_STORE
is forbidden 😢
Any idea? I hope I don't need to abandon deno deploy.
Thanks in advance!5 Replies
What database driver are you using?
You can configure the CA certificate through the driver arguments usually
I'm using postgresjs from deno.land/x and when I provide the CA certificate it doesn't work 😦 I have to use either
--cert
or SSL_CERT_FILE
and DENO_TLS_CA_STORE
. If I use npm:postgres
it simply doesn't work.. no matter which one I use.
@lucacasonato If you have a working example I'll take it 😅I don't know about
npm:postgres
, but I am relatively sure npm:pg
should work
Something like this:
Thanks a lot 🙏 I'll give it a try and tell you if I made it work 😅
Indeed
npm:pg
is working 🥳 I'll have to figure out how to make it work with kysely now haha. Thanks a lot!
All good for me!:partyparrot: