Skip to content
Newer
Older
100644 41 lines (32 sloc) 1.02 KB
6b1df07 @rwdaigle Initial commit of ptls from previous work
authored
1 require 'mongrel_cluster/recipes'
2
3 set :application, "ptls"
4 default_run_options[:pty] = true
5 set :repository, "git@github.com:yfactorial/#{application}.git"
6 set :branch, "master"
7 set :domain, "labs.yfactorial.com"
8
9 # set :deploy_via, :remote_cache
10 set :git_shallow_clone, 1
11 set :deploy_via, :copy
12 # set :copy_cache, true
13 set :copy_exclude, [".git"]
14 set :deploy_to, "/var/www/apps/#{application}"
15 set :mongrel_conf, "/etc/mongrel_cluster/ptls.yml"
16 set :db_conf, "/etc/ptls/database.yml"
17 set :scm, "git"
18 set :user, 'deploy'
19 set :use_sudo, false
20
21 role :app, domain
22 role :web, domain
23 role :db, domain, :primary => true
24
25 # Callbacks
26 after "deploy:update_code", "deploy:link_configs"
27
28 namespace :deploy do
29
30 # Override default restart task
31 desc "Restart #{application} mongrels"
32 task :restart, :roles => :app do
33 invoke_command "cd #{current_path} && mongrel_rails cluster::restart --config #{mongrel_conf} --clean"
34 end
35
36 task :link_configs, :roles => :app do
37 run "ln -nfs #{db_conf} #{release_path}/config/database.yml"
38 end
39
40 end
Something went wrong with that request. Please try again.