Last active
August 29, 2015 14:25
-
-
Save ydkn/c1e1baf334fb0af77733 to your computer and use it in GitHub Desktop.
Capistrano, RVM, Bundler and capistrano-rails-console example configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-2.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' | |
# Includes tasks from other gems included in your Gemfile | |
require 'capistrano/rvm' | |
require 'capistrano/bundler' | |
require 'capistrano/rails' | |
require 'capistrano/rails/console' | |
# Loads custom tasks from `lib/capistrano/tasks' if you have any defined. | |
Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, 'foo' | |
set :repo_url, 'git@foo:bar' | |
set :deploy_to, '/srv/foo' | |
set :keep_releases, 5 | |
set :format, :pretty | |
set :log_level, :info | |
set :pty, true | |
set :linked_files, %w{config/database.yml config/sidekiq.yml} | |
set :linked_dirs, %w{log tmp/pids tmp/cache tmp/sockets} | |
namespace :deploy do | |
task :restart | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :development do | |
gem 'capistrano', require: false | |
gem 'capistrano-rvm', require: false | |
gem 'capistrano-bundler', require: false | |
gem 'capistrano-rails', require: false | |
gem 'capistrano-rails-console', require: false | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :stage, :production | |
server 'foo.bar', user: 'appuser', roles: %w(web app db) | |
set :rails_env, 'production' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment