Google AppEngine供应商部署(作曲家)

时间:2018-01-28 08:34:19

标签: php google-app-engine composer-php vendor

供应商文件夹无法在App引擎中部署。

我在本地安装了composer install,并在localhost中找到了工作

但是,要部署

gcloud app deploy app.yaml

可悲的是,供应商文件夹无法在我的App Engine中部署。在本地,我有来自作曲家的供应商文件夹:

enter image description here

但是当我使用gcloud app deploy app.yaml在App引擎源代码中部署时,没有供应商文件夹:

enter image description here

的index.php

require 'vendor/autoload.php';

的app.yaml

runtime: php55
api_version: 1

handlers:

- url: /(.*\.(htm$|html$|css$|js$|vendor$))
  static_files: \1
  upload: (.*\.(htm$|html$|css$|js$|vendor$))
  application_readable: true

- url: /stylesheets
  static_dir: stylesheets

- url: /fonts
  static_dir: fonts

- url: /src
  static_dir: src

- url: /vendor
  static_dir: vendor

- url: /vendor/composer
  static_dir: vendor/composer

- url: /vendor
  script: vendor

- url: /(.+\.php)$
  script: \1

- url: /image
  static_dir: image

- url: /.*
  script: index.php

1 个答案:

答案 0 :(得分:0)

仅部署app目录中存在的内容(app.yaml文件所在的位置xoxo)。但是您的vendor目录显示在上面的一个目录中。

如果是这样可以解释为什么没有部署它。您需要在xoxo目录中移动/符号链接/复制它。