本文介绍了我无法在 Heroku 上使用 Strapi 连接到 Postgres DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试按照此处所述使用 Postgres 在 Heroku 上部署 Strapi
Trying to deploy Strapi on Heroku with Postgres as described here
strapi.io/documentation/v3.x/deployment/heroku.html
但我收到此错误
error: no pg_hba.conf entry for host "84.212.51.43", user "ssqqeaz***", database "d6gtu***", SSL off我使用 Heroku Postgres 插件.
I use Heroku Postgres add-on.
我的数据库配置:
module.exports = ({ env }) => ({ defaultConnection: 'default', connections: { default: { connector: 'bookshelf', settings: { client: 'postgres', host: env('DATABASE_HOST', '127.0.0.1'), port: env.int('DATABASE_PORT', 27017), database: env('DATABASE_NAME', 'strapi'), username: env('DATABASE_USERNAME', ''), password: env('DATABASE_PASSWORD', ''), }, options: { ssl: true }, }, }, });为什么?请帮忙!
推荐答案尝试将 ssl : true 改为 ssl : false
更多推荐
我无法在 Heroku 上使用 Strapi 连接到 Postgres DB
发布评论