doutan2111 2015-12-07 15:01
浏览 66
已采纳

使用本地存储库中的git生成错误,在Azure上部署Laravel

I am trying to deploy a new Laravel application to an Azure webapp from a local git repository. In the app settings I configured the following as is suggested for deploying laravel on Azure:

App Settings - SCM_REPOSITORY_PATH => D:\homeepository - SCM_TARGET_PATH => D:\home\site

Virtual Applications and Directories - / => site\public

Kudu - Composer installed as extension

However when I run git push repo master in the command line it runs fine but at the end this is what I see:

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 

The files are not in D:\home\site but are in the repository. If I use the default settings the files are deployed but I still get the error. However the response time of the site can be extremely slow over 10s sometimes. I am also wondering if this error is to blame. Has anyone deployed laravel on azure recently and had this problem?

  • 写回答

1条回答 默认 最新

  • dpg76975 2015-12-08 02:37
    关注

    There is no necessary to set these App settings to deploy laravel apps to Azure Web Apps via Git. And by default, the root directory of the web app on Azure is D:\home\site\wwwroot\, usually we don’t need to change it.

    You can refer to this answer of Deploy Laravel to Azure to get steps of deploying laravel app to Azure. Also if you need to expose public folder to public, you may refer to laravel 5.1 on windows azure web application.

    Especially, according your error message, it seems that you leverage several symfony packages, here is a similar thread on SO "Unable to kill the process" error with "php composer.phar install" on Azure, you can try the methods mentioned there. Otherwise, you can try to first delete cache files, then run the composer command.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!