Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
require 'railsmachine/recipes' require 'config/recipes/my_cap_tasks' # ============================================================================= # 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 path must be the path on each machine that will # form the root of the application path. set :application, "mytestapp" set :domain, "mytestapp.com" set :repository, "--username pyrat --password sdfdsf http://blavla.svnrepository.com/svn/#{application}/trunk" set :rails_env, "production" set :mongrel_servers, 1 # ============================================================================= # 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. role :web, domain role :app, domain role :db, domain, :primary => true # ============================================================================= # OPTIONAL VARIABLES # ============================================================================= set :deploy_to, "/var/www/apps/#{application}" set :user, "deploy" # defaults to the currently logged in user # set :scm, :darcs # defaults to :subversion # set :svn, "/path/to/svn" # defaults to searching the PATH # set :darcs, "/path/to/darcs" # defaults to searching the PATH # set :cvs, "/path/to/cvs" # defaults to searching the PATH # set :gateway, "gate.host.com" # default to no gateway # ============================================================================= # SSH OPTIONS # ============================================================================= ssh_options[:keys] = %w(/home/pyrat/.ssh/simple) ssh_options[:port] = 24450 # ============================================================================= # TASKS # ============================================================================= # Define tasks that run on all (or only some) of the machines. You can specify # a role (or set of roles) that each task should be executed on. You can also # narrow the set of servers to a subset of a role by specifying options, which # must match the options given for the servers to select (like :primary => true) desc "An after update code hook" task :after_update_code do rename_db_file end desc "This stops and starts the nginx webserver on deploy" task :after_restart do nginx_stop nginx_start end
This paste will be private.
From the Design Piracy series on my blog: