有人用云 运行 部署过 Metabase 吗?

Has anyone deployed Metabase with cloud run?

我做了研究,但找不到任何关于在 GCP 上使用 Cloud 运行 部署 Metabase 的“方法”,我只是在部署它时发现了问答问题。
我的目标是使用 Cloud 运行 部署 Metabase 并使用 Postgres 作为数据库。我已经通过 Cloud 运行 部署了应用程序并且在 git 上有 cloudbuild.yml 管道,我用它来构建我的应用程序我只想添加元数据库。
有什么方向或解决方案吗?

不建议在云端部署 Metabase 运行 因为:

Computation is scoped to a request. You should only expect to be able to do computation within the scope of a request: a container instance does not have any CPU available if it is not processing a request.

Container runtime contract

因此您可能会遇到加载应用程序和数据库连接超时的问题。

我认为您最好的选择是使用 AppEngine Flexible。

Install Metabase on Google Cloud with Docker – App Engine

在云上使用元数据库非常困难运行。 运行在 Flexible App Engine 上安装它更昂贵(~100 美元/月)。元数据库入口点执行大量进程,如果 Cloud 运行 决定创建另一个容器实例,它将显示加载元数据库页面,因此我们必须进行多次手动刷新才能准备好新容器。

我通过使用更多的 JVM JAVA_OPTS -Xmx4g 并将 MAX_INSTANCES 限制为 1 来解决这个问题。我设置了一个 Cloud Scheduler task 谁对元数据库服务库进行 get 查询 URL 每 10 分钟一次。

使用此配置元数据库将保持活动状态,云 运行 将永远不会创建超过 1 个容器。这样就不会再出现刷新问题了

目前我对此配置没有任何问题,但我认为托管元数据库的最佳方式是 运行 在 Compute Engine VM 上。