webgriffe/deployer-magento2 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webgriffe/deployer-magento2

Composer 安装命令:

composer require webgriffe/deployer-magento2

包简介

Deployer recipe for Magento 2 project

README 文档

README

Deployer recipe for Magento 2 project. This adds some useful tasks for db and media operations and it overrides some

Install

Install it using Composer:

$ composer require --dev webgriffe/deployer-magento2 dev-master

Usage

Require the recipe in your deploy.php:

namespace Deployer;

require __DIR__ . '/vendor/webgriffe/deployer-magento2/magento.php';

// ... usual Deployer configuration

This recipe overrides some tasks of the original Deployer Magento2 recipe:

  • The tasks deploy:magento and deploy now do not enable and disable the maintenance page. Instead, if you want to do that you must use one of two new tasks deploy:magento-maintenance and deploy-maintenance.
  • The task magento:deploy:assets now uses the assets_locales environment variable that you can define in your deploy.php file like this:
    set('assets_locales', 'en_GB en_US it_IT'); 
  • The task deploy:resetOPCache called inside deploy and deploy:maintenance uses variable base_url that you can define in your deploy.php file like this:
    server('staging', 'my.server.com')
        ->user('myUser')
        ->set('deploy_path', '/path/to/public_html')
        ->set('http_user', 'myUser')
        ->set('http_group', 'myGroup')
        ->set('base_url', 'http://myBaseUrl.com/')
        ->stage('staging');

It also adds the magento:first-deploy task which is useful when depoying a project for the first time (when Magento is not installed).

Magento useful tasks

This recipe provides some Magento's related tasks:

  • magento:db-dump: creates a gzipped database dump on the remote stage in the deploy user's home directory
  • magento:db-pull: pulls database from the remote stage to local environment
  • magento:media-pull: pulls Magento media from the remote stage to local environment
    • With the media_pull_exclude_dirs environment variable it's possible to specify which sub-directories of the media dir you want to exclude. Usage example:

      add('media_pull_exclude_dirs', ['wysiwyg']);
    • You can specify the execution timeout for this task by using the media-pull-timeout argument while running the command. This is needed because the default execution's time for the tasks on deployer is of 300s and when you first run this command it could take a while if the media directory is big (or maybe after a huge import). Usage example:

      dep magento:media-pull --media-pull-timeout 900
      

License

This library is under the MIT license. See the complete license in the LICENSE file.

Credits

Developed by Webgriffe®. Please, report to us any bug or suggestion by GitHub issues.

统计信息

  • 总下载量: 10.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-17