我正在嘗試將基於Laravel的Web應用程序部署到Swisscom應用程序雲。爲此我使用提供的PHP Buildpack。 Docs展示了Lumen的一個例子,所以我認爲它應該和Laravel一起工作。在Cloudfoundry上部署Laravel應用程序
使用的命令:cf push app-name -m 512M -n app-name
雖然部署我得到這兩個錯誤:
一)
The extension 'fpm' is not provided by this buildpack.
The extension 'tokenizer' is not provided by this buildpack.
The extension 'dom' is not provided by this buildpack.
The extension 'json' is not provided by this buildpack.
The extension 'pcre' is not provided by this buildpack.
The extension 'reflection' is not provided by this buildpack.
The extension 'spl' is not provided by this buildpack.
B)
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postInstall
> php artisan optimize
PHP Warning: require(/tmp/app/bootstrap/../vendor/autoload.php):failed to open stream: No such file or directory in /tmp/app/bootstrap/autoload.php on line 17
PHP Fatal error: require(): Failed opening required '/tmp/app/bootstrap/../vendor/autoload.php'(include_path='../lib/php:/tmp/app/lib') in /tmp/app/bootstrap/autoload.php on line 17
Script php artisan optimize handling the post-install-cmd event returned with an error
我options.json
文件:
{
"WEBDIR": "public",
"PHP_VERSION": "{PHP_70_LATEST}",
"PHP_EXTENSIONS": [ "bz2", "zlib", "openssl", "fpm", "tokenizer", "curl", "mcrypt", "mbstring", "pdo", "pdo_mysql"]
}
謝謝你的幫助!
如果有人有越來越PHP7和Laravel 5.x的與CF的工作努力,我創建了一個模板包https://github.com/chas688/cf-laravel。 –