Permalink
Browse files

added capistrano

  • Loading branch information...
1 parent 1384182 commit 7cdad8998ff0eef072c24ac482378e6d868bab25 @orenomba committed Aug 11, 2012
Showing with 81 additions and 4 deletions.
  1. +1 −0 .caprc
  2. +5 −0 Capfile
  3. +5 −0 Gemfile
  4. +30 −0 Gemfile.lock
  5. +9 −4 config/database.yml
  6. +31 −0 config/deploy.rb
View
1 .caprc
@@ -0,0 +1 @@
+require 'capistrano_colors'
View
@@ -0,0 +1,5 @@
+load 'deploy'
+# Uncomment if you are using Rails' asset pipeline
+load 'deploy/assets'
+Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+load 'config/deploy' # remove this line to skip loading any of the default tasks
View
@@ -24,6 +24,7 @@ gem 'exception_notification', :require => 'exception_notifier'
gem "paperclip"
gem "unicorn"
+gem "mysql2"
# Gems used only for assets and not required
# in production environments by default.
@@ -49,4 +50,8 @@ group :development do
gem "quiet_assets"
gem "annotate", :git => "https://github.com/ctran/annotate_models.git"
gem 'growl'
+ gem "capistrano"
+ gem "rvm-capistrano"
+ gem "capistrano_colors"
+ gem 'capistrano-unicorn', :require => false, :git => "https://github.com/sosedoff/capistrano-unicorn.git"
end
View
@@ -26,6 +26,13 @@ GIT
formtastic (~> 2.2.0)
rails (>= 3.2.0)
+GIT
+ remote: https://github.com/sosedoff/capistrano-unicorn.git
+ revision: bafc12cd8235307d30b5c85259914d17c5ece2d3
+ specs:
+ capistrano-unicorn (0.1.6)
+ capistrano
+
GEM
remote: https://rubygems.org/
specs:
@@ -60,6 +67,13 @@ GEM
arel (3.0.2)
bcrypt-ruby (3.0.1)
builder (3.0.0)
+ capistrano (2.12.0)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
+ capistrano_colors (0.5.5)
childprocess (0.3.4)
ffi (~> 1.0, >= 1.0.6)
cocaine (0.2.1)
@@ -100,6 +114,7 @@ GEM
guard-spork (1.1.0)
guard (>= 1.1)
spork (>= 0.8.4)
+ highline (1.6.13)
hike (1.2.1)
httpauth (0.1)
i18n (0.6.0)
@@ -139,8 +154,16 @@ GEM
mime-types (1.19)
multi_json (1.3.6)
multipart-post (1.1.5)
+ mysql2 (0.3.11)
net-http-digest_auth (1.2.1)
net-http-persistent (2.7)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.5.2)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
nokogiri (1.5.5)
ntlm-http (0.1.1)
oauth (0.4.6)
@@ -204,6 +227,8 @@ GEM
railties (>= 3.0)
rspec (~> 2.11.0)
rubyzip (0.9.9)
+ rvm-capistrano (1.2.5)
+ capistrano (>= 2.0.0)
sass (3.1.20)
sass-rails (3.2.5)
railties (~> 3.2.0)
@@ -264,6 +289,9 @@ PLATFORMS
DEPENDENCIES
annotate!
+ capistrano
+ capistrano-unicorn!
+ capistrano_colors
capybara!
coffee-rails (~> 3.2.1)
exception_notification
@@ -274,10 +302,12 @@ DEPENDENCIES
guard-spork
i18n_generators
jquery-rails
+ mysql2
paperclip
quiet_assets
rails (= 3.2.7)
rspec-rails
+ rvm-capistrano
sass-rails (~> 3.2.3)
sorcery
sqlite3
View
@@ -19,7 +19,12 @@ test:
timeout: 5000
production:
- adapter: sqlite3
- database: db/production.sqlite3
- pool: 5
- timeout: 5000
+ adapter: mysql2
+ encoding: utf8
+ reconnect: false
+ database: rails_tutorial_production
+ pool: 5
+ username: rails_tutorial
+ password: rails_tutorial_password
+ host: localhost
+ socket: rails_tutorial
View
@@ -0,0 +1,31 @@
+#rvm
+require "rvm/capistrano"
+set :rvm_ruby_string, '1.9.3@rails_tutorial'
+before 'deploy:setup', 'rvm:install_rvm' # install RVM
+before 'deploy:setup', 'rvm:install_ruby' # install Ruby and create gemset, or:
+before 'deploy:setup', 'rvm:create_gemset' # only create gemset
+
+
+require 'capistrano_colors'
+set :application, "rails_tutorial"
+set :repository, "git@github.com:orenomba/rails_tutorial.git"
+set :scm, :git
+
+set :user, "ac"
+set :use_sudo, false
+
+role :web, "bian.local" # Your HTTP server, Apache/etc
+role :app, "bian.local" # This may be the same as your `Web` server
+role :db, "bian.local", :primary => true # This is where Rails migrations will run
+#role :db, "your slave db-server here"
+
+set :deploy_to, "/home/ac/fjord/deploy"
+
+# if you want to clean up old releases on each deploy uncomment this:
+# after "deploy:restart", "deploy:cleanup"
+
+#unicorn
+require 'capistrano-unicorn'
+set :unicorn_bin, "unicorn_rails"
+after "deploy", "unicorn:reload"
+

0 comments on commit 7cdad89

Please sign in to comment.