Skip to content
⚙️Deploy your Magento 2 faster and easier with this Deployer Recipe.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Deployer Magento 2 recipe

Build Status Tags Total Downloads

Easy tool to deploy and run automated commands in your Magento 2 servers.

How to install

How to install Deployer:

curl -LO && sudo mv deployer.phar /usr/local/bin/dep && sudo chmod +x /usr/local/bin/dep

How to install this Magento 2 recipe:

composer require rafaelstz/deployer-magento2 --dev

How to use

First of all, go to your project folder, then create a file called deploy.php. Inside of this file you can use this example below, modifying the values according with your project and server configurations.


namespace Deployer;
require_once __DIR__ . '/vendor/rafaelstz/deployer-magento2/deploy.php';

// Project
set('application', 'My Project Name');
set('repository', '');
set('default_stage', 'staging');

// Env Configurations
set('php', '/usr/bin/php70');
set('magerun', '/usr/bin/n98-magerun2');
set('composer', '/usr/bin/composer');

// Project Configurations
    ->set('deploy_path', '/home/my-project-folder')
    ->set('branch', 'master')
    ->set('is_production', 1)
    // ->configFile('~/.ssh/config')
    ->addSshOption('UserKnownHostsFile', '/dev/null')
    ->addSshOption('StrictHostKeyChecking', 'no');
You can’t perform that action at this time.