Hi, I'm having a weird problem when trying to conn...
# orm-help
m
Hi, I'm having a weird problem when trying to connect to a managed Postgrs database on Digitalocean from a Docker container (running in a Kubernetes cluster on Digitalocean). Prisma is not ablte to find the cert file. My connection string looks like this:
DATABASE_URL=<postgresql://username:password@project-do-user-xxxxxx-0.b.db.ondigitalocean.com>:xxxxxx/xxxxxx?sslmode=require&sslcert=ca-certificate.crt&pgbouncer=true
ca-certificate.crt is preseent in the container at the right location (prisma folder) and locally as well as on a DO droplet without Docker everything is working fine with exactly the same connection string. Not really sure what the problem is here, maybe anyone might have an idea?
1
j
For what it's worth, we use exclusively DO managed postgres instances and we have never had to provide our own CA crt file. DO has authority-verified TLS certs on all
*.<http://db.ondigitalocean.com|db.ondigitalocean.com>
managed DBs so it "just works".
❤️ 1
Here is the format we use for all our Prisma postgres DO managed DBs:
Copy code
<postgresql://doadmin:RLxqjwxGW8ySreGwAdXbEQh3o@api-psql-do-user-1270561-0.b.db.ondigitalocean.com:25060/api>
Of course I've obfuscated with fake password and user id and all that
but note that I did not have to even mention SSL or certs in that
It's all SSL by default
Verified by public authority
m
Ok, wow, this does the trick... thanks!
💯 1
n
Thanks for sharing this Jacob 🙌
💯 1