gpt4 book ai didi

google-app-engine - 'gcloud deploy' 提示同时拥有 .gcloudignore 和 skip_files,即使我两者都没有

转载 作者:太空宇宙 更新时间:2023-11-03 15:32:42 24 4
gpt4 key购买 nike

我正在尝试将 Django (v2.1) 应用程序部署到 App Engines Python37 运行时。这是我的 app.yaml,取自 Google example :

# [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/.*$

除了最基本的设置外,所有设置都被注释掉了,并且 repo 中没有 .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,但即便如此也不应该成为问题,因为我的 app.yaml 中没有 skip_files >.

谁能告诉我我做错了什么?

最佳答案

Gcloud deploy 会看到 #skip_files: 行,即使您已将其注释掉。删除该行,或更改其拼写。

关于google-app-engine - 'gcloud deploy' 提示同时拥有 .gcloudignore 和 skip_files,即使我两者都没有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52101736/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com