Skip to content

Commit

Permalink
Link mongrel_cluster.yml so mongrels can start
Browse files Browse the repository at this point in the history
Change-Id: I8bd80e7687059274ff5b27a68adbdba2d8f0cf8e
Reviewed-on: http://review.engineyard.com/184
Reviewed-by: Sam Merritt <smerritt@engineyard.com>
Tested-by: Sam Merritt <smerritt@engineyard.com>
  • Loading branch information
indirect authored and smerritt committed Apr 9, 2010
1 parent d21551a commit f3ef085
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/ey-deploy/deploy.rb
Expand Up @@ -34,18 +34,15 @@ def push_code
# task
def restart
puts "~> Restarting app servers"
puts "~> restarting app: #{c.latest_release}"
roles :app_master, :app, :solo do
restart_command = case c.stack
when "nginx_unicorn"
"/etc/init.d/unicorn_#{c.app} restart"
sudo("/etc/init.d/unicorn_#{c.app} deploy")
when "nginx_mongrel"
"monit restart all -g #{c.app}"
sudo("monit restart all -g #{c.app}")
when "nginx_passenger", "apache_passenger"
"touch #{c.latest_release}/tmp/restart.txt"
end
if restart_command
puts "~> restarting app: #{c.latest_release}"
sudo("cd #{c.current_path} && INLINEDIR=/tmp #{c.framework_envs} #{restart_command}")
sudo("touch #{c.latest_release}/tmp/restart.txt")
end
callback(:after_restart)
end
Expand Down Expand Up @@ -109,6 +106,7 @@ def symlink_configs(release_to_link=c.latest_release)
"ln -nfs #{c.shared_path}/system #{release_to_link}/public/system",
"ln -nfs #{c.shared_path}/pids #{release_to_link}/tmp/pids",
"ln -nfs #{c.shared_path}/config/database.yml #{release_to_link}/config/database.yml",
"ln -nfs #{c.shared_path}/config/mongrel_cluster.yml #{release_to_link}/config/mongrel_cluster.yml",
"chown -R #{c.user}:#{c.group} #{release_to_link}"
].join(" && ")
end
Expand Down

0 comments on commit f3ef085

Please sign in to comment.