Permalink
Browse files

added example capistrano files to serve as a template

  • Loading branch information...
1 parent 7c8c794 commit 9ce1f8eb4aa5bdd08bb15b741a1652000cc14862 @nesquena committed Jun 16, 2009
@@ -0,0 +1,39 @@
+# =============================================================================
+# GENERAL SETTINGS
+# =============================================================================
+
+set :application, "demo"
+set :deploy_to, "/var/apps/#{application}"
+set :deploy_via, :remote_cache
+set :scm, :git
+set :repository, "deploy@dev.demo.com:/home/demo.git"
+set :git_enable_submodules, 1
+set :keep_releases, 3
+
+# =============================================================================
+# STAGE SETTINGS
+# =============================================================================
+
+# set :default_stage, "experimental"
+set :stages, %w(production experimental)
+set :default_stage, "experimental"
+require 'capistrano/ext/multistage'
+
+# =============================================================================
+# RECIPE INCLUDES
+# =============================================================================
+
+require 'rubygems'
+require 'cap_recipes/tasks/whenever'
+require 'cap_recipes/tasks/apache'
+require 'cap_recipes/tasks/passenger'
+require 'cap_recipes/tasks/memcache'
+require 'cap_recipes/tasks/juggernaut'
+require 'cap_recipes/tasks/delayed_job'
+require 'cap_recipes/tasks/rails'
+
+ssh_options[:paranoid] = false
+default_run_options[:pty] = true
+
+# PASSENGER
+set :base_ruby_path, '/opt/ruby-enterprise' # not /usr
@@ -0,0 +1,14 @@
+# Domain
+role :web, "stage.app.com"
+role :app, "stage.app.com"
+role :db, "stage.app.com", :primary => true
+
+# GENERAL
+set :user, "deploy"
+set :runner, "deploy"
+set :password, "demo567"
+set :use_sudo, true
+ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "demo")]
+
+# Branch
+set :branch, 'develop'
@@ -0,0 +1,20 @@
+# Domain
+role :web, "demo.app.com"
+role :app, "demo.app.com"
+role :db, "demo.app.com", :primary => true
+role :juggernaut, "juggernaut.app.com", :no_release => true
+role :delayed_job, "dj.app.com", :no_release => true
+role :memcache, "memcache.app.com", :no_release => true
+
+# GENERAL
+set :user, "deploy"
+set :runner, "deploy"
+set :password, "demo567"
+set :use_sudo, true
+set :juggernaut_role, :juggernaut
+set :delayed_job_role, :delayed_job
+set :memcache_role, :memcache
+ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "demo")]
+
+# Branch
+set :branch, 'master'
View
@@ -0,0 +1,36 @@
+# =============================================================================
+# GENERAL SETTINGS
+# =============================================================================
+
+role :web, "demo.app.com"
+role :app, "demo.app.com"
+role :db, "demo.app.com", :primary => true
+
+set :application, "demo"
+set :deploy_to, "/var/apps/#{application}"
+set :deploy_via, :remote_cache
+set :scm, :git
+set :repository, "deploy@dev.demo.com:/home/demo.git"
+set :git_enable_submodules, 1
+set :keep_releases, 3
+set :user, "deploy"
+set :runner, "deploy"
+set :password, "demo567"
+set :use_sudo, true
+set :branch, 'production'
+
+# =============================================================================
+# RECIPE INCLUDES
+# =============================================================================
+
+require 'rubygems'
+require 'cap_recipes/tasks/whenever'
+require 'cap_recipes/tasks/apache'
+require 'cap_recipes/tasks/passenger'
+require 'cap_recipes/tasks/memcache'
+require 'cap_recipes/tasks/juggernaut'
+require 'cap_recipes/tasks/delayed_job'
+require 'cap_recipes/tasks/rails'
+
+ssh_options[:paranoid] = false
+default_run_options[:pty] = true

0 comments on commit 9ce1f8e

Please sign in to comment.