Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ready... set... go

  • Loading branch information...
commit 41c783820d0fb520cb85388c7401f3c1be2050a5 1 parent ee01826
@zapnap zapnap authored
Showing with 51 additions and 0 deletions.
  1. +51 −0 Capfile
View
51 Capfile
@@ -0,0 +1,51 @@
+require 'capistrano/version'
+require 'rubygems'
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+
+# standard settings
+set :application, "rubydoc.info"
+set :domain, "rubydoc.info"
+role :app, domain
+role :web, domain
+role :db, domain, :primary => true
+
+# environment settings
+set :user, "deploy"
+set :group, "deploy"
+set :deploy_to, "/var/www/apps/#{application}"
+set :deploy_via, :remote_cache
+default_run_options[:pty] = true
+
+# scm settings
+set :repository, "git://github.com/lsegal/rubydoc.info.git"
+set :scm, "git"
+set :branch, "master"
+#set :git_enable_submodules, 1
+
+namespace :deploy do
+ task :restart do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+
+ task :cold do
+ # no migrations to run
+ update_code
+
+ run "cp #{release_path}/config.yaml.sample #{shared_path}/config.yaml"
+ run "mkdir -p #{shared_path}/repos"
+ run "git clone git://github.com/lsegal/yard.git #{shared_path}/yard"
+
+ symlink
+ restart
+ end
+end
+
+namespace :rubydoc do
+ task :symlink, :roles => [:app] do
+ run "ln -s #{shared_path}/config.yaml #{release_path}/config.yaml"
+ run "ln -s #{shared_path}/repos #{release_path}/repos"
+ run "ln -s #{shared_path}/yard #{release_path}/yard"
+ end
+end
+
+after "deploy:symlink", "rubydoc:symlink"
Please sign in to comment.
Something went wrong with that request. Please try again.