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.