Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 将Symfony项目部署到应用程序引擎-错误:文件太多_Php_Symfony_Google App Engine - Fatal编程技术网

Php 将Symfony项目部署到应用程序引擎-错误:文件太多

Php 将Symfony项目部署到应用程序引擎-错误:文件太多,php,symfony,google-app-engine,Php,Symfony,Google App Engine,第一次将Symfony项目部署到Google App Engine时,运行gcloud App deploy 错误: 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.

第一次将Symfony项目部署到Google App Engine时,运行
gcloud App deploy

错误:

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[...]
我怀疑问题出在我的app.yaml文件上:

runtime: php55
api_version: 1

handlers:
# tell appengine where our static assets live
- url: /public
  static_dir: public
(我想我至少没有告诉它不要上传供应商的东西,比如忽略)

如何更新app.ymal文件以部署项目?

PS项目文件夹如下所示:


我认为你的应用程序没有任何问题。yaml,我觉得它不错

我认为您最有可能达到部署配额:

开发人员上载应用程序的次数。目前的配额是每天10000个。 每个版本的应用程序最多可上载10000个文件。每个文件的最大大小限制为32 MB


我会尝试使用不同的服务,而不是只有一个庞大的服务。另一个想法是将一些文件保存在谷歌云存储中,并使用客户端库访问它们。

使用命令的
--verbosity
选项增加部署详细度,您将获得上载的所有文件的列表。然后使用
app.yaml
中的选项指定要忽略的选项:

可选。skip_files元素指定 应用程序目录不会上载到应用程序引擎。价值 是正则表达式或正则表达式列表。任何 与任何正则表达式匹配的文件名将从中省略 上载应用程序时要上载的文件列表。 文件名相对于项目目录

跳过文件具有以下默认设置:

skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
注意:注意覆盖此配置的默认值

我可能错了,但您的项目结构图像表明您的应用程序代码位于
src
目录中。如果是这样,我建议将
app.yaml
文件移动到其中-包含部署的
app.yaml
文件的目录被视为应用程序/服务的顶级目录-其全部内容将上载到GAE。在这样的移动之后,您可能需要调整一些路径-GAE将考虑与此应用程序/服务top dir相关的所有应用程序/服务路径。如果需要,可以有选择地将项目目录中的一些文件/目录符号链接到
src
dir中,部署遵循符号链接,用实际内容替换它们

一些相关职位:


我以前遇到过这个问题。我意识到我的python虚拟环境位于我的主目录/env下,所以我将其添加到app.yaml中

skip_files:
 - env/