Created
May 22, 2009 10:24
-
-
Save apetrov/116051 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For complete deployment instructions, see the following support guide: | |
# http://www.engineyard.com/support/guides/deploying_your_application_with_capistrano | |
require "eycap/recipes" | |
# ================================================================================================= | |
# ENGINE YARD REQUIRED VARIABLES | |
# ================================================================================================= | |
# You must always specify the application and repository for every recipe. The repository must be | |
# the URL of the repository you want this recipe to correspond to. The :deploy_to variable must be | |
# the root of the application. | |
set :keep_releases, 5 | |
set :application, "quevita" | |
set :user, "quevita" | |
set :password, "" | |
set :deploy_to, "/data/#{application}" | |
set :monit_group, "quevita" | |
set :runner, "quevita" | |
set :repository, "https://svn.quevita.net/svn/quevita/branches/week54release" | |
set :scm_username, "capistrano" | |
set :scm_password, "deiPish3" | |
set :scm, :subversion | |
set :deploy_via, :filtered_remote_cache | |
set :repository_cache, "/var/cache/engineyard/#{application}" | |
set :production_database, "quevita_production" | |
set :production_dbhost, "psql83-1-master" | |
set :staging_database, "quevita_staging" | |
set :staging_dbhost, "psql83-1-staging" | |
set :dbuser, "quevita_db" | |
set :dbpass, "Zmr902jE152S" | |
# comment out if it gives you trouble. newest net/ssh needs this set. | |
ssh_options[:paranoid] = false | |
# ================================================================================================= | |
# ROLES | |
# ================================================================================================= | |
# You can define any number of roles, each of which contains any number of machines. Roles might | |
# include such things as :web, or :app, or :db, defining what the purpose of each machine is. You | |
# can also specify options that can be used to single out a specific subset of boxes in a | |
# particular role, like :primary => true. | |
task :production do | |
role :web, "70.42.33.4:8010" # quevita [mongrel,sphinx,memcached] [psql83-1-master] | |
role :app, "70.42.33.4:8010", :mongrel => true, :sphinx => true, :memcached => true | |
role :app, "70.42.33.4:8071", :mongrel => true, :sphinx => true, :memcached => true | |
role :db , "70.42.33.4:8010", :primary => true | |
set :rails_env, "production" | |
set :environment_database, defer { production_database } | |
set :environment_dbhost, defer { production_dbhost } | |
end | |
task :staging do | |
role :web, "70.42.33.4:8072" # quevita [mongrel,sphinx,memcached] [psql83-1-master] | |
role :app, "70.42.33.4:8072", :mongrel => true, :sphinx => true, :memcached => true | |
role :db , "70.42.33.4:8072", :primary => true | |
set :rails_env, "staging" | |
set :environment_database, defer { staging_database } | |
set :environment_dbhost, defer { staging_dbhost } | |
end | |
# ================================================================================================= | |
desc "Symlink assets task" | |
task :symlink_assets, :roles => :app do | |
run "ln -nfs #{shared_path}/assets/ #{release_path}/public/assets" | |
end | |
desc "Symlink assets task" | |
task :symlink_constants_config, :roles => :app do | |
run "ln -nfs #{shared_path}/config/constants.rb #{release_path}/config/constants.rb" | |
end | |
task :copy_ultrasphinx_config,:roles=>:app do | |
run "cp #{shared_path}/config/ultrasphinx/default.base #{release_path}/config/ultrasphinx/production.base" | |
end | |
after "deploy:symlink_configs", "symlink_constants_config" | |
after "deploy:symlink_configs", "symlink_assets" | |
# ================================================================================================= | |
# Do not change below unless you know what you are doing! | |
after "deploy", "deploy:cleanup" | |
after "deploy:migrations" , "deploy:cleanup" | |
after "deploy:update_code", "deploy:symlink_configs" | |
after "deploy:symlink_configs","ultrasphinx:symlink" | |
# after "ultrasphinx:symlink","ultrasphinx:configure" | |
# after "ultrasphinx:configure","ultrasphinx:reindex" | |
# after "ultrasphinx:reindex","sphinx:restart" | |
after "deploy:symlink_configs", "memcached:symlink_configs" | |
# uncomment the following to have a database backup done before every migration | |
# before "deploy:migrate", "db:dump" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment