-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: use Vercel postgress show - error: connection is insecure (try using sslmode=require
)
#9985
Comments
You can try to modify the databaseDriverOptions in the medusa-config.js file: module.exports = defineConfig({
projectConfig: {
databaseDriverOptions: { ssl: { rejectUnauthorized: true } },
// ......
}, |
Please check the medusa-config.ts file
also got
|
I do not why but medusa 2.0 accepts the following value to disable ssl check. hope team looks into this. postgres://.....................?ssl_mode=disable add ?ssl_mode=disable |
Hello @hans642 Thanks for reporting the issue. I can confirm that it is a bug. We are working on a fix |
Meanwhile @hans642 Can you please create the database manually and confirm if you are able to run the |
First create database manually then run migrate command.
|
Thanks for verifying that. Can you please share your |
|
I've used to have a similar issue to this one, and I fixed it by doing the following,
module.exports = defineConfig({
projectConfig: {
[...]
databaseDriverOptions: {
ssl: false,
},
[...]
}
[...]
}
This is working for me. |
I actually expect the Because I am able to run migrations targeting a Neon DB with the following medusa config file and env variables. import { loadEnv, defineConfig } from '@medusajs/framework/utils'
loadEnv(process.env.NODE_ENV || 'development', process.cwd())
module.exports = defineConfig({
projectConfig: {
databaseUrl: process.env.DATABASE_URL,
http: {
storeCors: process.env.STORE_CORS!,
adminCors: process.env.ADMIN_CORS!,
authCors: process.env.AUTH_CORS!,
jwtSecret: process.env.JWT_SECRET || "supersecret",
cookieSecret: process.env.COOKIE_SECRET || "supersecret",
}
}
})
|
The |
you are a hero! |
Package.json file
Node.js version
v20.15.1
Database and its version
16.4
Operating system name and version
macOS 15.1
Browser name
No response
What happended?
When create database use Vercel postgress
.env config
cmd:
npx medusa db:create
Got error:
Then update the .env config
got error:
Expected behavior
Hope can use Vercel postgress config the sslmode
Actual behavior
Can't use it
Link to reproduction repo
medusa(v2)
The text was updated successfully, but these errors were encountered: