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.

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

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵