Skip to content

Instantly share code, notes, and snippets.

@jherdman
Created July 17, 2009 14:22
Show Gist options
  • Save jherdman/149077 to your computer and use it in GitHub Desktop.
Save jherdman/149077 to your computer and use it in GitHub Desktop.
# Adapted from http://blogs.sun.com/Jacobkessler/entry/capistrano_and_glassfish_now_with
namespace :deploy do
desc "Start Glassfish Gem from a shutdown state"
task :cold do
start
end
desc "Stop a server running Glassfish Gem"
task :stop do
run "kill -INT $(cat #{current_path}/capistrano-#{application})"
end
desc "Starts a server running Glassfish Gem"
task :start do
run "#{jruby_location}bin/jruby -S glassfish --contextroot #{context_root} --port #{gf_port} --environment #{environment} --runtimes #{jruby_runtimes} --runtimes-min #{jruby_min_runtimes} --runtimes-max #{jruby_max_runtimes} -P #{current_path}/capistrano-#{application} --daemon #{release_path}"
end
desc "Restarts a server running Glassfish Gem"
task :restart do
stop
start
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment