问题
I'm trying to deploy a Django (v2.1) app to App Engines Python37 runtime. This is my app.yaml
which was taken from a 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/.*$
All but the most basic settings are commented out and there is no .gcloudignore
file in the repo. Yet when doing gcloud app deploy
I get the following error message:
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.
I've read somewhere that a .glcoudignore is created automatically during deployment, but even that shouldn't be a problem since I have no skip_files
in my app.yaml
.
Can someone tell me what I'm doing wrong here?
回答1:
Gcloud deploy is seeing the #skip_files:
line, even though you have it commented out. Delete that line, or change its spelling.
来源:https://stackoverflow.com/questions/52101736/gcloud-deploy-complains-about-having-both-a-gcloudignore-and-skip-files-even