Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Smarter deploys #162

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .capistrano/metrics
@@ -0,0 +1 @@
true
14 changes: 9 additions & 5 deletions Capfile
Expand Up @@ -26,10 +26,14 @@ Dir.glob('lib/capistrano/tasks/*.cap').each { |r| import r }


require 'capistrano/bundler'
set :bundle_flags, "--deployment --quiet --binstubs"
require 'capistrano/rails'
require 'capistrano/rails/migrations'


# If you are using rvm add these lines:
# require 'capistrano/rvm'
# set :rvm_type, :user
# set :rvm_ruby_version, '2.1.3p242'
#require 'capistrano/rbenv'
set :rbenv_type, :user
set :rbenv_ruby, '2.1.5'
set :rbenv_path, '/home/deploy/.rbenv/'
set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
#set :rbenv_map_bins, %w{rake gem bundle ruby rails}
#set :rbenv_roles, :all # default value
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -55,7 +55,7 @@ group :production do
gem 'capistrano', '~> 3.1.0'
gem 'capistrano-bundler', '~> 1.1.2'
gem 'capistrano-rails', '~> 1.1.1'
gem 'capistrano-rvm', github: "capistrano/rvm"
#gem 'capistrano-rbenv'

# Email me when errors happen!
gem 'exception_notification'
Expand Down
9 changes: 0 additions & 9 deletions Gemfile.lock
@@ -1,11 +1,3 @@
GIT
remote: git://github.com/capistrano/rvm.git
revision: 9cfef39cf0022839dca6b5b330dfefeb5fc363e7
specs:
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)

GIT
remote: git://github.com/sarahsemark/mmenu-rails.git
revision: 15d49c5bcb792ee58999f418c6e8ebf9e5cc7e73
Expand Down Expand Up @@ -356,7 +348,6 @@ DEPENDENCIES
capistrano (~> 3.1.0)
capistrano-bundler (~> 1.1.2)
capistrano-rails (~> 1.1.1)
capistrano-rvm!
capybara
coffee-rails (~> 4.0.0)
dalli
Expand Down
9 changes: 3 additions & 6 deletions config/deploy.rb
@@ -1,5 +1,5 @@
# config valid only for Capistrano 3.1
lock '3.1.0'
#lock '3.1.0'

set :application, 'suitor'
set :repo_url, 'git@github.com:sarahsemark/suitor.git'
Expand Down Expand Up @@ -30,15 +30,11 @@
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}

# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
#set :default_env, { path: "~/.rbenv/shims:~/.rbenv/bin:$PATH" }

# Default value for keep_releases is 5
# set :keep_releases, 5

# rvm setup
# set :rvm_type, :system
# set :rvm_ruby_version, '2.1.3-p242'

namespace :deploy do

desc 'Restart application'
Expand All @@ -50,6 +46,7 @@
end

after :publishing, 'deploy:restart'
after :publishing, 'deploy:migrate'
after :finishing, 'deploy:cleanup'

end
6 changes: 3 additions & 3 deletions config/environments/production.rb
Expand Up @@ -68,7 +68,7 @@
# Make sure Premailer compiles assets with the correct URL
config.action_controller.asset_host =
config.action_mailer.asset_host = 'http://mrsuitor.com/'

# Use Mandrill for email
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true
Expand All @@ -79,8 +79,8 @@
:port => 587,
:user_name => ENV["MANDRILL_USERNAME"],
:password => ENV["MANDRILL_PASSWORD"],
:enable_starttls_auto => true,
:authentication => 'login',
:enable_starttls_auto => true,
:authentication => 'login',
:domain => 'mrsuitor.com'
}

Expand Down