我在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参数无效。
发布于 2014-11-24 20:21:31
您应该做的是为app.yaml中的每个应用程序设置环境变量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。
https://stackoverflow.com/questions/27104115
复制相似问题