Giter Club home page Giter Club logo

deployer-magemojo's Introduction


Magemojo Stratus Deployer Recipe

Easily run cache clearing in your deployments

Build Status Tags Total Downloads

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', '[email protected]: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

Rafael Correa Gomes

deployer-magemojo's People

Contributors

nemke82 avatar rafaelstz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

deployer-magemojo's Issues

Add new Magemojo CLI commands

There are new commands, for example:

/usr/share/stratus/cli zerodowntime.init;
/usr/share/stratus/cli zerodowntime.switch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.