rafaelstz/deployer-magemojo
最新稳定版本:1.1.0
Composer 安装命令:
composer require rafaelstz/deployer-magemojo
包简介
MageMojo Stratus Deployer Recipe
README 文档
README
Easily run cache clearing in your deployments
Use this tool integrated with the Deployer to use the power of MageMojo Stratus CLI.
If you are using Magento 2 you can use this Magento 2 Deployer Recipe together!
Features
You can run the command followed by dep. Example: dep mm:cache:clear --stage=production.
| Command | Description |
|---|---|
| mm:cron:stop | Stop Crons from running |
| mm:cron:start | Start crons |
| mm:zdd:init | Zero Downtime Deployment Init |
| mm:zdd:switch | Zero Downtime Deployment Switch with check |
| mm:autoscaling:reinit | It will issue a redeploy of PHP-FPM services |
| mm:cache:clear | Clears everything |
| mm:cloudfront:clear | Clears Cloudfront cache |
| mm:opcache:clear | Clears OPCache cache |
| mm:redis:clear | Clears Redis cache |
| mm:varnish:clear | Clears Varnish cache |
How to install
How to install Deployer:
curl -LO https://deployer.org/deployer.phar && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep
How to install this package:
composer require rafaelstz/deployer-magemojo --dev
How to use
After install it, you can add the line below after the namespace and run dep to check:
// MageMojo Recipe require __DIR__ . '/vendor/rafaelstz/deployer-magemojo/MageMojo.php';
This recipe when installed automatically will clean all caches after the deploy success, but if you want to restart all services, add these into the bottom:
// MageMojo restart services before('deploy', 'mm:cron:stop'); after('deploy', 'mm:cron:start'); after('success', 'mm:autoscaling:reinit'); // MageMojo clean all caches after('success', 'mm:cloudfront:clear'); after('success', 'mm:varnish:clear'); after('success', 'mm:redis:clear');
For example:
<?php namespace Deployer; // MageMojo Recipe require __DIR__ . '/vendor/rafaelstz/deployer-magemojo/MageMojo.php'; // Project set('application', 'My Project Name'); set('repository', 'git@bitbucket.org:mycompany/my-project.git'); set('default_stage', 'production'); // Project Configurations host('production') ->hostname('iuse.magemojo.com') ->user('my-user') ->port(22) ->set('deploy_path', '/home/my-project-folder') ->set('branch', 'master') ->stage('production'); // MageMojo restart services after('success', 'mm:autoscaling:reinit'); // MageMojo clean all caches after('success', 'mm:cloudfront:clear'); after('success', 'mm:varnish:clear'); after('success', 'mm:redis:clear');
License
MIT
统计信息
- 总下载量: 3.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-03