Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am using environment variables to connect to by database through a Node.js webapp. When a submit a request to my database I get a 504 Gateway Time-out error. I checked my pm2 logs, and I am getting the following error "no pg_hba.conf entry for host “<myIP>”, user “<myusername>”, database “<mydatabase>”, SSL off.
Here are my environment variables
PGUSER=<myusername> PGHOST=<myhost> PGPASSWORD=<mypassword> PGDATABASE=<mydatabase> PGPORT=<myport> PGSSLMODE=true NODE_ENV=production
All of those are copied from the connection parameters provided to me by digital ocean. The managed database is SSL = require, but when I change PGSSLMODE to =require, I get the following pm2 log error “self signed certificate in certificate chain”.
I also tried setting the connection string provided to me as the environmental variable connection: to see if that would work, but that gave me the following error “connect ECONNREFUSED 127.0.0.1:5432”. My digital ocean managed database is not 5432, which I know is the default Postgres port, so it makes me think that it isn’t seeing that environment variable.
Any help is appreciated, and please let me know if you need more context!
444d1e8f0baa4d36b2e08aae738f2e
alex reed
4f973b49ee8845faba44b031b8ef14
3f2d6cc974094bc6a8b84055a3a7b6
44698b4d25054ea6a464f4a5215a7b
dolphinnnn
phosphide
xcco3x
Ross
Telmo Valverde
Alexandre Herlinvaux
Lukas Ulrich