要在GAE应用中部署“FriendsOfSymfony(FOS)”包,您需要执行以下步骤:
{
"require": {
"friends-of-symfony/user-bundle": "2.3.*"
}
}
composer install
确保您已经将vendor文件夹添加到.gitignore文件中,以避免将依赖项添加到版本控制中。
在您的GAE应用的部署配置文件(例如app.yaml)中添加composer路径。示例代码如下:
runtime: php
env: flex
runtime_config:
document_root: public
front_controller_file: index.php
enable_stackdriver_integration: true
env_variables:
APP_ENV: prod
handlers:
- url: /(.+\.php)$
script: auto
- url: /
static_files: public/index.php
upload: public/index.php
- url: /.*
script: auto
composer:
use_application_default_credentials: true
gcloud app deploy
这些步骤将帮助您将“FriendsOfSymfony(FOS)”包部署到GAE应用中。请确保您已正确配置composer和GAE的部署配置文件。