Skip to content

Instantly share code, notes, and snippets.

@joahking
Created July 29, 2009 12:43
Show Gist options
  • Select an option

  • Save joahking/158128 to your computer and use it in GitHub Desktop.

Select an option

Save joahking/158128 to your computer and use it in GitHub Desktop.
require 'capitate'
require 'capitate/recipes'
set :project_root, File.dirname(__FILE__)
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
set :application, "misustento"
set :domain, "misustento.com"
set :domain_aliases, ["misustento.es"]
set :use_sudo, false
set :user, 'deploy'
set :shared_dirs, ['config', 'tmp']
ssh_options[:forward_agent] = true
set :deploy_to, "/home/deploy/#{application}"
set :scm, :git
set :repository, "deploy@eegaia:/home/repos/misustento.git"
set :branch, 'master'
set :git_shallow_clone, 3
set :git_enable_submodules, 1
# set :scm_verbose, true
# # capitate mysql:setup variables
# #FIXME capistrano pwd prompt was giving an error
set :mysql_admin_password, ASK_JK
# these are used to generate mysql settings for production
set :db_name, XXXX
set :db_user, XXX
set :db_pass, ASK2_JK
set :db_socket, "/var/run/mysqld/mysqld.sock"
set :templates_dirs, [File.join(File.dirname(__FILE__), 'deploy/templates')]
role :app, domain
role :web, domain
role :db, domain, :primary => true
#TODO put capitate Mysql recipes in the chain for fully cap own setup
after "deploy:setup", "misustento:create_shared_dirs", 'active_record:setup', "passenger:setup"
after "deploy:update_code", "deploy:symlink", "active_record:update_code", "misustento:unpack_gems", "deploy:restart"
namespace :deploy do
desc "restart your passenger deployed app"
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment