本文介绍了`gcloud preview app deploy app.yaml`部署除了Docker镜像之外的所有源文件。这是必要的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

部署Google管理的VM Dart项目时,不仅部署了Docker镜像,而且部署了所有源文件。因为部署也遵循符号链接,所有依赖关系文件都被部署。

除了Docker镜像之外,是否还需要部署所有这些文件?

When deploying a Google Managed VM Dart project not only the Docker image is deployed but also all source files. Because deployment also follows symlink all files of dependencies are deployed too.
Is it necessary to deploy all these files in addition to the Docker image?

推荐答案

事实上,只需要部署Docker镜像和 app.yaml 文件。
有关详情,请参阅此讨论

In fact only the Docker image and the app.yaml file need to be deployed.See this discussion for more details https://groups.google.com/a/dartlang.org/d/msg/cloud/MSUOFbnaaKs/7LrUzOXLtBoJ

为了防止部署太多文件,请添加

To prevent the deployment of too many files add

skip_files:
- ^((?!app\.yaml).)*$

app.yaml 文件。

我假设 index.yaml 文件需要部署,但有一个关于这个问题在链接的讨论。

I assume the index.yaml file needs to be deployed too but there is an open question about this in the linked discussion. I'll update the answer when this got clarified.

如果使用 static_files 处理程序,则提供的文件不能已排除。

If static_files handler are used the served files must not be excluded.

这篇关于`gcloud preview app deploy app.yaml`部署除了Docker镜像之外的所有源文件。这是必要的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:14