rafaelstz / deployer-magento2
Magento 2 deployment tool based on deployer.org
Fund package maintenance!
rafaelstz] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.
[user1
user2
www.buymeacoffee.com/rafaelcg
Installs: 22 067
Dependents: 0
Suggesters: 0
Security: 0
Stars: 50
Watchers: 7
Forks: 29
Open Issues: 13
Requires
- composer/composer: 1.10.23
- 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
- phpstan/phpstan: ^0.9.2
- squizlabs/php_codesniffer: ^3.2
- dev-master
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.0.1
- 1.0.0
- dev-dependabot/composer/friendsofphp/php-cs-fixer-3.17.0
- dev-dependabot/composer/nikic/php-parser-4.15.5
- dev-dependabot/composer/squizlabs/php_codesniffer-3.7.2
- dev-develop
- dev-feature/abstracting
- dev-revert-6-feature/remove-composer-update
This package is auto-updated.
Last update: 2024-10-21 17:19:03 UTC
README
Easy tool to deploy and run automated commands in your Magento 2 servers.
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 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.
<?php namespace Deployer; require_once __DIR__ . '/vendor/rafaelstz/deployer-magento2/deploy.php'; // Project set('application', 'My Project Name'); set('repository', 'git@bitbucket.org:lesite/my-project.git'); set('default_stage', 'staging'); //set('languages', 'en_US pt_BR'); //set('verbose', '-v'); // Env Configurations set('php', '/usr/bin/php70'); set('magerun', '/usr/bin/n98-magerun2'); set('composer', '/usr/bin/composer'); // Project Configurations host('my-store.com') ->hostname('iuse.magemojo.com') ->user('my-user') ->port(22) ->set('deploy_path', '/home/my-project-folder') ->set('branch', 'master') ->set('is_production', 1) ->stage('staging') ->roles('master') // ->configFile('~/.ssh/config') ->identityFile('~/.ssh/id_rsa') ->addSshOption('UserKnownHostsFile', '/dev/null') ->addSshOption('StrictHostKeyChecking', 'no');
Just add this code below too if you don't want to use releases and symlinks
set('release_path', "{{deploy_path}}"); desc('Deploying...'); task('deploy', [ 'deploy:info', 'deploy:lock', 'magento:maintenance:enable', 'git:update_code', 'composer:install', 'deploy:magento', 'magento:maintenance:disable', 'deploy:unlock', 'success' ]);