https://github.com/rafaelstz/deployer-magemojo
With this MageMojo Stratus Deployer Recipe you can use the MageMojo's CLI power
https://github.com/rafaelstz/deployer-magemojo
cli deploy deployer hosting magento
Last synced: about 2 months ago
JSON representation
With this MageMojo Stratus Deployer Recipe you can use the MageMojo's CLI power
- Host: GitHub
- URL: https://github.com/rafaelstz/deployer-magemojo
- Owner: rafaelstz
- License: mit
- Created: 2019-01-03T01:03:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-23T15:17:56.000Z (over 1 year ago)
- Last Synced: 2024-05-01T19:42:03.857Z (about 1 year ago)
- Topics: cli, deploy, deployer, hosting, magento
- Language: PHP
- Homepage: https://packagist.org/packages/rafaelstz/deployer-magemojo
- Size: 27.3 KB
- Stars: 9
- Watchers: 3
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
Easily run cache clearing in your deployments
Use this tool integrated with the [Deployer](https://deployer.org/) to use the power of [MageMojo Stratus CLI](https://magemojo.com/kb/knowledge-base/stratus-cli/).
If you are using Magento 2 you can use this [Magento 2 Deployer Recipe](https://github.com/rafaelstz/deployer-magento2) 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:
```php
// 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:
```php
// 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
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
[Rafael Correa Gomes](https://www.linkedin.com/in/rafaelcgstz/)