【问题标题】:How to configure sailsjs DB connection with Google Cloud SQL如何使用 Google Cloud SQL 配置sailsjs 数据库连接
【发布时间】:2018-09-26 20:06:06
【问题描述】:

我在 Google App Engine 上运行使用 Google Cloud Postgresql 实例的 Sails.js 应用程序。部署应用程序时出现连接被拒绝错误。这是我的sailsjs 连接配置:

postgresGoogle: {
      adapter: 'sails-postgresql',
      socketPath: '/cloudsql/' + process.env.INSTANCE_CONNECTION_NAME,
      user: 'xxxxx',
      password: 'xxxxx',
      database: 'postgres'
     }

如果我添加主机,它会引发超时错误。有谁知道使用 GCP postresql 配置sailsjs 连接的正确方法?

【问题讨论】:

  • 您的 Sails.js 应用程序到底在哪里?它在 App Engine Flex 上吗?我建议部署到 App Engine Flex,如 here 所述,然后从 Flex 环境连接到 PostgreSQL。否则,您是否使用此link 中描述的任何选项步骤进行连接?
  • 请对此有任何反馈?

标签: postgresql google-app-engine google-cloud-platform sails.js


【解决方案1】:

您的 Sails.js 应用程序到底在哪里?它在 App Engine Flex 上吗?我建议部署到 App Engine Flex,如 here 所述,然后从 Flex 环境连接到 PostgreSQL。否则,您是否使用此link 中描述的任何选项步骤进行连接?

【讨论】:

    猜你喜欢
    • 2021-04-15
    • 1970-01-01
    • 2021-02-12
    • 1970-01-01
    • 2020-10-31
    • 2019-11-10
    • 1970-01-01
    • 2013-11-14
    • 1970-01-01
    相关资源
    最近更新 更多