First time deploying a Symfony project to Google App Engine, ran gcloud app deploy
.
Error:
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: This deployment has too many files. New versions are limited to 10000 files for this app.
- '@type': type.googleapis.com/google.rpc.BadRequest
fieldViolations:
- description: This deployment has too many files. New versions are limited to 10000
files for this app.
field: version.deployment.files[...]
I suspect the problem is my app.yaml file:
runtime: php55
api_version: 1
handlers:
# tell appengine where our static assets live
- url: /public
static_dir: public
(I think I'm at least missing something to tell it not to upload the vendor stuff eg. ignore).
How should I update my app.ymal file for project to deploy?
PS Project folders shown below:
I don't think there's anything wrong with your app.yaml, it looks good to me.
I think you are most likely hitting the deployment quota [1]:
I would try to use different services [2] instead of having only one huge service. Another idea could be save some files in Google Cloud Storage [3] and access them by using Client libraries [4].
Increase the deployment verbosity using the
--verbosity
option for the gcloud app deploy command and you'll get the list of all the files uploaded. Then use theskip_files
option in yourapp.yaml
to specify the ones you want ignored:Note: watch out for overwriting the defaults for this config.
I may be wrong, but your project structure image suggests your app code resides in the
src
directory. If so I'd suggest moving theapp.yaml
file inside it - the directory containing theapp.yaml
file being deployed is considered to be the top dir of the app/service - its entire content will be uploaded to GAE. You may need to adjust some paths after such move - GAE considers all app/service paths relative to this app/service top dir. If you need them, you can selectively symlink some files/directories from the project directory into thesrc
dir, deployment follows symlinks, replacing them with their actual content.Some related posts: