我正在尝试将 Django (v2.1) 应用程序部署到 App Engines Python37 运行时。这是我的app.yaml
这是取自谷歌示例 https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/django/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
存储库中的文件。然而在做的时候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 是在部署期间自动创建的,但即使这样也不应该成为问题,因为我没有skip_files
in my app.yaml
.
有人可以告诉我我在这里做错了什么吗?
Gcloud 部署正在看到#skip_files:
行,即使您已将其注释掉。删除该行,或更改其拼写。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)