gmo*_*lau 3 google-app-engine google-cloud-platform gcloud google-app-engine-python
我正在尝试将Django(v2.1)应用程序部署到App Engines Python37运行时。这是我的app.yaml内容,取自Google的示例:
# [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/.*$
Run Code Online (Sandbox Code Playgroud)
除了最基本的设置外,所有其他设置均已注释掉,并且.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.
Run Code Online (Sandbox Code Playgroud)
我读的地方,一个.glcoudignore在部署过程中自动创建的,但即使是因为我不认为不应该是一个问题,skip_files在我的app.yaml。
有人可以告诉我我在做什么错吗?
#skip_files:即使您已将其注释掉,Gcloud部署也能看到界线。删除该行,或更改其拼写。
| 归档时间: |
|
| 查看次数: |
760 次 |
| 最近记录: |