【问题标题】:Deploying Laravel on Azure with git from Local Repository producing Error使用本地存储库中的 git 在 Azure 上部署 Laravel 产生错误
【发布时间】:2015-12-08 10:37:01
【问题描述】:

我正在尝试从本地 git 存储库将新的 Laravel 应用程序部署到 Azure webapp。在应用程序设置中,我按照在 Azure 上部署 laravel 的建议配置了以下内容:

应用设置 - SCM_REPOSITORY_PATH => D:\home\repository - SCM_TARGET_PATH => D:\home\site

虚拟应用程序和目录 - / => 网站\公共

苦杜 - 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 并遇到过这个问题?

【问题讨论】:

    标签: php git laravel azure


    【解决方案1】:

    无需设置这些应用设置即可通过 Git 将 laravel 应用部署到 Azure Web 应用。并且默认情况下,Azure 上 Web 应用的根目录是D:\home\site\wwwroot\,通常我们不需要更改它。

    您可以参考Deploy Laravel to Azure的这个答案,了解将 laravel 应用部署到 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 命令。

    【讨论】:

    • 我在没有作曲家的情况下推送它,添加了扩展,然后运行作曲家安装。
    猜你喜欢
    • 1970-01-01
    • 2018-06-19
    • 1970-01-01
    • 2011-01-18
    • 1970-01-01
    • 2015-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多