`gcloud preview app deploy app.yaml` deploys all s

2019-07-31 14:11发布

问题:

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?

回答1:

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).)*$

to the app.yaml file.

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.

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