gpt4 book ai didi

postgresql - 使用 docker 连接托管在 azure 存储中的 Postgres 数据库

转载 作者:行者123 更新时间:2023-12-03 07:05:39 26 4
gpt4 key购买 nike

我正在尝试从 Flyway 中连接托管在 azure 存储帐户中的 postgres 数据库,flyway 在 docker 容器中作为 docker 镜像运行

docker run --rm Flyway/flyway -url=jdbc:postgresql://postgres-azure-db:5432/postgres -user=user -password=password info 但我得到了错误错误:无法从数据库获取连接

任何想法/文档链接都会有帮助

最佳答案

您在 this flyway issue 中遇到类似的错误(不同的上下文,相同的通用解决方案)

my missing piece for reaching private Cloud SQL instances from private worker pools in Cloud Build was a missing network route.
The fix is ensuring the Service Networking VPC peer has the "Export custom routes" setting enabled, and that the Cloud Router advertises the route.

在您的上下文 (Azure) 中,请参阅“Quickstart: Use Azure Data Studio to connect and query PostgreSQL

您还可以尝试使用local Postgres instance first, and Azure Data Studio ,用于测试。

关于postgresql - 使用 docker 连接托管在 azure 存储中的 Postgres 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71469482/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com