PHPackages                             magemojo/deployer-example - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. magemojo/deployer-example

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

magemojo/deployer-example
=========================

Webscale Stratus Deployer Recipe Addon

004PHP

Since Mar 20Pushed 4y ago3 watchersCompare

[ Source](https://github.com/magemojo/deployer-example)[ Packagist](https://packagist.org/packages/magemojo/deployer-example)[ RSS](/packages/magemojo-deployer-example/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Webscale Stratus deployer-example
=================================

[](#webscale-stratus-deployer-example)

Webscale Stratus Deployment example repo using Deployer.org application

What is Deployer?
A deployment tool written in PHP with support for popular frameworks out of the box. Deployer used by hundreds thousands of projects around the world, performing more than a million of deploys each month. Deployer comes with more than 50 ready to use recipes for frameworks and third-party services.

This repository is created to help you to adjust your Deployer.org deployment processes and use it to deploy application on Webscale Stratus platform.

Basically to get started first we need to install Deployer application as per  guidelines.

```
curl -LO https://deployer.org/deployer.phar
mv deployer.phar /usr/local/bin/dep
chmod +x /usr/local/bin/dep

```

Now, we can cd into the project and run following command:

```
dep init

```

Deployer will ask you a few question and after finishing you will have a deploy.php or deploy.yaml file. This is our deployment recipe. It contains hosts, tasks and requires other recipes. All framework recipes that come with Deployer are based on the common recipe.

Deployer.org already covered Magento 2 recpie and it can be downloaded/reviewed here:

How to install this package:

```
composer require magemojo/deployer-example --dev

```

How to use After install it, you can add the line below after the namespace and run dep to check:

```
// Webscale Stratus Recipe
require __DIR__ . '/vendor/magemojo/deployer-example/stratus.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:

```
// Webscale Stratus start/stop/restart services
before('deploy', 'stratus:cron:stop');
after('deploy', 'stratus:cron:start');
after('success', 'stratus:zdd:init');
after('success', 'stratus:zdd:switch');

// Webscale Stratus clean all caches
after('success', 'stratus:cloudfront:clear');
after('success', 'stratus:varnish:clear');
after('success', 'stratus:redis:clear');
after('success', 'stratus:cache:clear');

```

For example:

```
