gpt4 book ai didi

dart - 如何使用 dart-pub-serve 运行带有模块的 gcloud 调度程序?

转载 作者:行者123 更新时间:2023-12-03 02:53:48 24 4
gpt4 key购买 nike

我有多个( Dart )模块在我的 gcloud 中运行。在开发过程中,我希望他们连接到我的本地 pub serve服务器。当我单独运行它们时,我通常使用这个命令:

gcloud preview app run app.yaml --dart-pub-serve 10.6.6.6:7779

我怎么能对多个模块和使用一个调度程序做同样的事情?调度程序行如下所示:

gcloud preview app run dispatch.yaml \
../api/app.yaml \
../dashboard/app.yaml \
../webserver/app.yaml

提供多个 --dart-pub-serve争论没有奏效。

最佳答案

您应该能够做的是设置环境变量DART_PUB_SERVE app.yaml 中的每个应用程序像这样:

env_variables:
DART_PUB_SERVE: 'http://10.6.6.6:7779'

然后为每个模块进行不同的设置。保留此环境变量进行部署是可以的,因为在生产中运行时, pub build 的输出总是被使用。

看看 https://www.dartlang.org/cloud/client-server/ .

选项 --dart-pub-serve已弃用。

你也应该改用 runtime: custom并手动运行 pub build在部署之前为每个模块。

关于dart - 如何使用 dart-pub-serve 运行带有模块的 gcloud 调度程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27104115/

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