google-app-engine - 'gcloud deploy' 抱怨同时拥有 .gcloudignore 和 skip_files,即使我两者都没有
问题描述
我正在尝试将 Django (v2.1) 应用程序部署到 App Engines Python37 运行时。这是我app.yaml
的摘自谷歌示例:
# [START django_app]
runtime: python37
#api_version: 1
#threadsafe: yes
handlers:
- url: /static
static_dir: static/
- url: .*
script: <project_name>.wsgi.application
# Only pure Python libraries can be vendored
# Python libraries that use C extensions can
# only be included if they are part of the App Engine SDK
# Using Third Party Libraries: https://cloud.google.com/appengine/docs/python/tools/using-libraries-python-27
#libraries:
#- name: MySQLdb
# version: 1.2.5
# [END django_app]
# Google App Engine limits application deployments to 10,000 uploaded files per
# version. The skip_files section allows us to skip virtual environment files
# to meet this requirement. The first 5 are the default regular expressions to
# skip, while the last one is for all env/ files.
#skip_files:
#- ^(.*/)?#.*#$
#- ^(.*/)?.*~$
#- ^(.*/)?.*\.py[co]$
#- ^(.*/)?.*/RCS/.*$
#- ^(.*/)?\..*$
#- ^env/.*$
除了最基本的设置外,所有设置都被注释掉了,并且.gcloudignore
repo 中没有文件。然而,当gcloud app deploy
我收到以下错误消息时:
ERROR: (gcloud.app.deploy) You cannot use skip_files and have a .gcloudignore file in the same application. You should convert your skip_files patterns and put them in your .gcloudignore file. For information on the format and syntax of .gcloudignore files, see https://cloud.google.com/sdk/gcloud/reference/topic/gcloudignore.
我在某处读到 .glcoudignore 是在部署期间自动创建的,但即使这样也不应该是问题,因为我的 .glcoudignore 文件中skip_files
没有app.yaml
。
有人可以告诉我我在这里做错了什么吗?
解决方案
Gcloud deploy 看到这#skip_files:
条线,即使您已将其注释掉。删除该行,或更改其拼写。
推荐阅读
- c# - C# DataGridview 与单元格事件中的条件
- python - Django过滤器 - 按相关模型中字段的平均值过滤
- c - 接近初始化结构警告
- python - Django文件上传中/files/的MultiValueDictKeyError
- python - 生成整数序列的完整排列
- javascript - 在 2 个 JS 应用程序之间同步事件
- android - 使用 sharedpreference 保存复选框值问题
- android - 自定义运行器类 AndroidJUnit4 应该有一个带有签名 AndroidJUnit4(Class testClass) 的公共构造函数
- javascript - 通过 AJAX 加载内容后,jQuery 砌体不起作用
- python - SpaceVim 未定义符号:PyUnicode_FromFormat