【问题标题】:Setup a PHP/Laravel 5 project with Bootstrap SB Admin 2 in Microsoft Azure在 Microsoft Azure 中使用 Bootstrap SB Admin 2 设置 PHP/Laravel 5 项目
【发布时间】:2016-05-30 09:37:00
【问题描述】:

我的计划是使用 bootstrap sb admin 2 模板制作一个 lavarel 项目。为了调整天蓝色,我使用了这个tutorial

我使用的是 Github,而不是 bitbucket。

在 azure web 应用程序中,我安装了 composer 扩展。 从 Kudu 控制台我安装了 bower 和 gulp

D:\home\site>npm install bower
npm WARN enoent ENOENT: no such file or directory, open 'D:\home\site\package.json' 
npm WARN site No description 
npm WARN site No repository field. 
npm WARN site No README data npm WARN site No license field.


D:\home\site>npm install gulp
npm WARN deprecated graceful-fs@3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash@1.0.2: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

我在 localhost 中使用 SB admin 准备了 Laravel 框架,然后我尝试将所有内容推送到 github 中。结果是失败,因为 azure 无法与 Github 同步。我认为 bower 或 gulp 都有问题,但我不知道如何解决。任何帮助将不胜感激。提前致谢。

结果:

Command: D:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd

Install Dependencies with Composer

Loading composer repositories with package information

Installing dependencies from lock file

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.

Nothing to install or update

Generating optimized autoload files

> php artisan clear-compiled

> php artisan optimize

Generating optimized class loader



  [Symfony\Component\Process\Exception\ProcessTimedOutException]           

  The process "php artisan optimize" exceeded the timeout of 300 seconds.  



An error has occurred during web site deployment.

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

Loading composer repositories with package information\r\nInstalling dependencies from lock file\r\nWarning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.\r\nNothing to install or update\r\nGenerating optimized autoload files\r\n> php artisan clear-compiled\r\n> php artisan optimize\r\n\r\n                                                                           \r\n  [Symfony\Component\Process\Exception\ProcessTimedOutException]           \r\n  The process "php artisan optimize" exceeded the timeout of 300 seconds.  \r\n                                                                           \r\n\r\ninstall [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...\r\nC:\Program Files (x86)\SiteExtensions\Kudu\55.50526.2249\bin\Scripts\starter.cmd D:\home\SiteExtensions\ComposerExtension\Hooks\deploy.cmd

【问题讨论】:

    标签: php twitter-bootstrap laravel azure


    【解决方案1】:

    您可以删除命令:

    "php artisan clear-compiled",
    "php artisan optimize"
    

    composer.json 文件中的"post-install-cmd" 脚本关闭下。然后在部署后通过 VSO 或 KUDU 控制台站点运行这些命令。

    这是与 SO 上相同的问题,Deploying a Laravel App on Azure。您可以参考此答案作为解决问题的解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-30
      • 1970-01-01
      • 2014-04-26
      相关资源
      最近更新 更多