This repository has been archived by the owner on Jun 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCapfile
84 lines (76 loc) · 2.5 KB
/
Capfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy'
namespace :deploy do
task :start do; end
task :stop do; end
task :restart, :roles => :app do
run "touch #{current_path}/tmp/restart.txt"
end
end
# ========================
# For FCGI Apps
# ========================
# NB: running the following :start task will delete your main public_html directory.
# So don't use these commands if you have existing sites in here.
# namespace :deploy do
#
# task :start, :roles => :app do
# #...
# end
#
# task :restart, :roles => :app do
# run "killall -u #{user} dispatch.fcgi"
# run "cd #{current_path} && chmod 755 #{chmod755}"
# end
#
# task :migrate do
# # Do nothing
# end
#
# end
# ========================
# For Mongrel Apps
# ========================
# namespace :deploy do
#
# task :start, :roles => :app do
# # run "rm -rf /home/#{user}/public_html;ln -s #{current_path}/public /home/#{user}/public_html"
# run "cd #{current_path} && mongrel_rails start -e production -p #{mongrel_port} -d"
# end
#
# task :stop, :roles => :app do
# # run "rm -rf /home/#{user}/public_html;ln -s #{current_path}/public /home/#{user}/public_html"
# run "cd #{current_path} && mongrel_rails stop"
# end
#
# task :restart, :roles => :app do
# stop
# sleep 1
# start
#
# run "cd #{current_path} && chmod 755 #{chmod755}"
# end
#
# end
# ========================
# For Mongrel Cluster Apps
# ========================
# namespace :deploy do
#
# task :start, :roles => :app do
# run "cd #{current_path} && mongrel_rails cluster::configure -e production -p #{mongrel_port}0 -N #{mongrel_nodes} -c #{current_path} --user #{user} --group #{user}"
# run "cd #{current_path} && mongrel_rails cluster::start"
# run "rm -rf /home/#{user}/public_html;ln -s #{current_path}/public /home/#{user}/public_html"
# run "mkdir -p #{deploy_to}/shared/config"
# run "mv #{current_path}/config/mongrel_cluster.yml #{deploy_to}/shared/config/mongrel_cluster.yml"
# run "ln -s #{deploy_to}/shared/config/mongrel_cluster.yml #{current_path}/config/mongrel_cluster.yml"
# end
#
# task :restart, :roles => :app do
# run "ln -s #{deploy_to}/shared/config/mongrel_cluster.yml #{current_path}/config/mongrel_cluster.yml"
# run "cd #{current_path} && mongrel_rails cluster::restart"
# run "cd #{current_path} && chmod 755 #{chmod755}"
# end
#
# end