Closed IanWang0403 closed 1 week ago
Your ssl
settings should be nested within a connection
option:
...
connection: {
ssl: {
rejectUnauthorized: true,
ca: fs.existsSync(
path.join(__dirname, process.env.DATABASE_SSL_CERT)
),
},
},
Did you follow a guide for this setup? If so, we need to get that updated.
@olivermrbl Thanks it worked.
The problem here is the type here. (also document doesn't have the connection)
Thanks, this was fixed in 2.0.5, so if you update to latest the error type should be resolved.
Package.json file
Node.js version
v20.11.0
Database and its version
PostgreSQL (ver. 16.4)
Operating system name and version
Ubuntu 22
Browser name
Chrome
What happended?
Using ssl to connect to db doesn't work. the connection has established but seems migration's connection does not use the connection details in projectConfig
Expected behavior
use the projectConfig's connection info
Actual behavior
Failed with error no pg_hba.conf entry for host since I'm using ssl
Link to reproduction repo
https://github.com/medusajs/medusa