Skip to content

unetstudio/magento-2-capistrano-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magento2 Capistrano Deploy

Deploy Magento 2 site using Capistrano

Prerequisite

  • Ruby 2.0 or higher.

  • Project using Git or other source control.

  • Bundler gem (global or local gem).

Documentation

Install

Using bundler for install dependencies gem

bundle install --path vendor/bundle

Configuration

File Constant
app/etc/env.production.php ADMIN_PATH, MYSQL_HOST, DB_NAME, DB_USERNAME, DB_PASSWORD
config/deploy/production.rb :deploy_to, server, user, role
config/deploy.rb :application, :repo_url, SERVER_USER, SERVER_GROUP, MAGENTO_USERNAME, MAGENTO_PASSWORD

Custom Tasks

  • Upload adminer.php: Do not use it for production.

  • Copy config.php: The Magento project must be contain config.php.dist inside app/etc/ folder.

  • Restart PHP FPM: To flush cache of Zend Opcache extension.

Deploy

Single application server deploy for each stage, e.g for production:

bundle exec cap production deploy

References

https://github.com/bundler/bundler

https://github.com/capistrano/capistrano

https://github.com/davidalger/capistrano-magento2

About

Deploy Magento 2 site using Capistrano

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published