rafaelstz / deployer-magemojo
MageMojo Stratus Deployer Recipe
Installs: 3 491
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 5
Open Issues: 2
Requires
- deployer/dist: ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.11
- nikic/php-parser: ^3.1
- phpmd/phpmd: ^2.6
- phpro/grumphp: ^0.14.0
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-12-23 17:39:02 UTC
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
.
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