Permalink
Browse files

Capistrano, hi!

  • Loading branch information...
1 parent d2d1976 commit 5eedaafffe2efcf13085d41f5a808770a80f4d16 @alagu alagu committed Mar 14, 2012
Showing with 65 additions and 1 deletion.
  1. +17 −0 Capfile
  2. +2 −1 Gemfile
  3. +15 −0 Gemfile.lock
  4. +31 −0 config/deploy.rb
View
@@ -0,0 +1,17 @@
+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
+
+
+namespace :deploy do
+ desc "Symlinking"
+ task :symlink_shared do
+ run "ln -s #{shared_path}/config/*.yml #{release_path}/config/"
+ end
+end
+
+
+after 'deploy:update_code', 'deploy:symlink_shared'
+after 'deploy:create_symlink', 'deploy:assets:precompile'
View
@@ -32,7 +32,8 @@ gem 'jquery-rails'
# gem 'unicorn'
# Deploy with Capistrano
-# gem 'capistrano'
+gem 'capistrano'
+gem 'capistrano-ext'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
View
@@ -35,6 +35,12 @@ GEM
bson_ext (1.6.0)
bson (= 1.6.0)
builder (3.0.0)
+ capistrano (2.11.2)
+ highline
+ net-scp (>= 1.0.0)
+ net-sftp (>= 2.0.0)
+ net-ssh (>= 2.0.14)
+ net-ssh-gateway (>= 1.1.0)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
@@ -49,6 +55,7 @@ GEM
httpclient (>= 2.2.0.2)
rack-oauth2 (>= 0.14.4)
tzinfo
+ highline (1.6.11)
hike (1.2.1)
httpclient (2.2.4)
i18n (0.6.0)
@@ -69,6 +76,13 @@ GEM
mongo (~> 1.3)
tzinfo (~> 0.3.22)
multi_json (1.1.0)
+ net-scp (1.0.4)
+ net-ssh (>= 1.99.1)
+ net-sftp (2.0.5)
+ net-ssh (>= 2.0.9)
+ net-ssh (2.3.0)
+ net-ssh-gateway (1.1.0)
+ net-ssh (>= 1.99.1)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
@@ -128,6 +142,7 @@ PLATFORMS
DEPENDENCIES
bootstrap-sass
bson_ext
+ capistrano
coffee-rails (~> 3.2.1)
fb_graph
jquery-rails
View
@@ -0,0 +1,31 @@
+set :application, "radios.goyaka.com"
+set :repository, "git@bitbucket.org:goyaka/goyakaradios.git"
+
+set :scm, :git
+# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
+
+role :web, "radios.goyaka.com" # Your HTTP server, Apache/etc
+set :deploy_via, :remote_cache # Does a git pull instead of git clone everytime. Much faster.
+set :domain, "radios.goyaka.com"
+set :deploy_to, "/srv/www/radios.goyaka.com/app"
+
+server domain, :web, :app
+
+# if you're still using the script/reaper helper you will need
+# these http://github.com/rails/irs_process_scripts
+
+set :user, "alagu" unless exists? :user
+set :use_sudo, false
+
+# RVM Shit
+$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
+require "rvm/capistrano"
+set :rvm_ruby_string, 'ruby-1.9.2-p290@default'
+
+namespace :deploy do
+ task :start do ; end
+ task :stop do ; end
+ task :restart, :roles => :app, :except => { :no_release => true } do
+ run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
+ end
+end

0 comments on commit 5eedaaf

Please sign in to comment.