Deploy CakePHP applications with Capistrano v3.*
IMPORTANT: Tested with CakePHP 3 thus far, but should work for CakePHP 2 that uses composer.
Add this line to your application's Gemfile:
gem 'capistrano', '~> 3.0.0'
gem 'capcake', '~> 3.0.0'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capcake
At this point, you can install capistrano:
$ cap install
This will create the required files in your ROOT/config
directory
At any time, for help:
$ cap -T
Add .capistrano
to your .gitignore
:
echo .capistrano/* >> .gitignore
Require the module in your Capfile
:
require 'capistrano/cakephp'
Some extras:
require 'capistrano/cakephp/assets'
require 'capistrano/cakephp/migrations'
The gem makes the following configuration variables available (shown with defaults)
set :cakephp_roles, :all
set :cakephp_flags, ''
set :cakephp_user, 'www-data'
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request