我正在尝试从本地git存储库将新的Laravel应用程序部署到Azure webapp。在应用程序设置中,我按照建议在Azure上部署laravel来配置以下内容:
应用设置 - SCM_REPOSITORY_PATH => d:\家\库 - SCM_TARGET_PATH => d:\家\站点
虚拟应用程序和目录 - / =>站点\公共
捻 - 作为扩展名安装的Composer
然而,当我在命令行中运行 git push repo master 时它运行正常,但最后这就是我所看到的:
remote: > php artisan clear-compiled
remote: .............................................................................
.....................................................................................
...............................
remote:
remote:
remote:
remote: [Symfony\Component\Process\Exception\RuntimeException]
remote:
remote: Unable to kill the process
remote: Fatal error: Uncaught exception 'Symfony\Component\Process\Exception\RuntimeE
xception' with message 'Unable to kill the process' in phar://D:/home/SiteExtensions/
ComposerExtension/Commands/composer.phar/vendor/symfony/process/Process.php:779
remote:
remote: Stack trace:
remote: #0 phar://D:/home/SiteExtensions/ComposerExtension/Commands/composer.phar/ven
dor/symfony/process/Process.php(173): Symfony\Component\Process\Process->stop()
remote:
remote: #1 [internal function]: Symfony\Component\Process\Process->__destruct()
remote:
remote: #2 {main}
remote: install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--n
o-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress]
[-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ign
ore-platform-reqs] [--] [<packages>]...
remote: thrown in phar://D:/home/SiteExtensions/ComposerExtension/Commands/composer
.phar/vendor/symfony/process/Process.php on line 779
remote:
remote: An error has occurred during web site deployment.
remote:
remote:
remote: Error - Changes committed to remote repository but deployment to website fail
ed.
To <url>
* [new branch] master -> master
文件不在D:\ home \ site中,但在存储库中。如果我使用默认设置,文件已部署,但我仍然收到错误。但是,网站的响应时间有时会超过10秒。我也想知道这个错误是否应该受到指责。最近是否有人在azure上部署了laravel并遇到了这个问题?
答案 0 :(得分:0)
没有必要设置这些应用程序设置以通过Git将laravel应用程序部署到Azure Web Apps。默认情况下,Azure上的Web应用程序的根目录是D:\home\site\wwwroot\
,通常我们不需要更改它。
您可以参考Deploy Laravel to Azure的这个答案来获取将laravel app部署到Azure的步骤。此外,如果您需要将公共文件夹公开,请参阅laravel 5.1 on windows azure web application。
特别是,根据您的错误消息,您似乎利用了几个symfony包,这里是SO "Unable to kill the process" error with "php composer.phar install" on Azure上的类似线程,您可以尝试那里提到的方法。否则,您可以尝试先删除缓存文件,然后运行composer命令。