Skip to content

Capistrano Deployment

Marvin Frederickson edited this page Feb 22, 2017 · 7 revisions

Capistrano can be used to deploy Concerto though you may need to tweak the deploy.rb file. It's recommended to use the apt-get packages to install/update concerto.

You'll need to add the following to your Gemfile.local and then run bundle install.

group :development do
  gem "capistrano"
  gem "capistrano-bundler"
  gem "capistrano-rails"
  gem "capistrano-passenger"
  gem "capistrano-rvm"
end

By default cap deploys the latest release, however you can specify which branch you want, just specify it as an environment variable: BRANCH=master cap production deploy.

In addition, you'll need to grant your deploy user sudo permissions by adding the following to a file in the /etc/sudoers.d directory.

Defaults:deploy env_keep+=RAILS_RELATIVE_URL_ROOT
deploy ALL=(ALL) NOPASSWD:/usr/bin/unlink, /usr/sbin/update-rc.d, /usr/bin/whoami, /usr/bin/env, /bin/sh

I had to install those gems above, manually. And you'll also need to make sure that your database.yml and concerto.yml files are in the shared/config directory on your server.