Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add capistrano

  • Loading branch information...
commit 04824cd88431d63bca84fc5d85e14813fec82562 1 parent f79aeb5
@jordanbyron jordanbyron authored
Showing with 59 additions and 1 deletion.
  1. +8 −0 Capfile
  2. +3 −1 Gemfile
  3. +15 −0 Gemfile.lock
  4. +33 −0 config/deploy.rb
View
8 Capfile
@@ -0,0 +1,8 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+
+# 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
4 Gemfile
@@ -25,7 +25,9 @@ gem 'haml'
gem 'sass'
gem 'redcarpet', "~> 2.0.0b3"
gem 'will_paginate', '~> 3.0'
-gem "cocoon"
+gem 'cocoon'
+
+gem 'capistrano'
# Gems used only for assets and not required
# in production environments by default.
View
15 Gemfile.lock
@@ -55,6 +55,12 @@ GEM
addressable (2.2.4)
arel (2.2.1)
builder (3.0.0)
+ capistrano (2.9.0)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
capybara (1.1.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -94,6 +100,7 @@ GEM
ffi (1.0.9)
fssm (0.2.7)
haml (3.1.3)
+ highline (1.6.2)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.14)
@@ -111,6 +118,13 @@ GEM
multi_xml (0.2.2)
multipart-post (1.1.3)
net-ldap (0.2.2)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.2.1)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
nokogiri (1.4.7)
notifier (0.1.3)
oa-basic (0.2.6)
@@ -214,6 +228,7 @@ PLATFORMS
DEPENDENCIES
acts-as-taggable-on
+ capistrano
capybara (~> 1.1.1)
cocoon
coffee-rails (~> 3.1.0)
View
33 config/deploy.rb
@@ -0,0 +1,33 @@
+require 'bundler/capistrano'
+
+set :application, "puzzlenode"
+set :repository, "git://github.com/rmu/puzzlenode.git"
+
+set :scm, :git
+set :deploy_to, "/var/rapp/_#{application}"
+
+set :user, "git"
+set :use_sudo, false
+
+set :deploy_via, :remote_cache
+
+set :branch, "rails31" #master
+server "rubymendicant.com", :app, :web, :db, :primary => true
+
+namespace :deploy do
+ task :restart, :roles => :app do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+end
+
+after 'deploy:update_code' do
+ {"database.yml" => "config/database.yml",
+ "omniauth.yml" => "config/omniauth.yml",
+ "secret_token.rb" => "config/initializers/secret_token.rb"}.
+ each do |from, to|
+ run "ln -nfs #{shared_path}/#{from} #{release_path}/#{to}"
+ end
+end
+
+after "deploy", "deploy:migrate"
+load 'deploy/assets'
Please sign in to comment.
Something went wrong with that request. Please try again.