Created
May 15, 2010 21:15
-
-
Save tessro/402402 to your computer and use it in GitHub Desktop.
Capistrano deployment script for JRuby/GlassFish gem.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "example_app" | |
set :domain, "example-app.com" | |
## IMPORTANT: "true" prevents the server from booting properly | |
## This line is sometimes recommended in other Capistrano configurations, | |
## but do not use it for GlassFish. | |
# default_run_options[:pty] = true | |
set :scm, :git | |
set :repository, "[email protected]:paulrosania/example_app.git" | |
set :user, "deploy" | |
set :branch, "master" | |
set :deploy_via, :remote_cache | |
set :deploy_to, "/home/deploy/sites/#{application}" | |
set :use_sudo, false | |
role :web, domain # Your HTTP server, Apache/etc | |
role :app, domain # This may be the same as your `Web` server | |
role :db, domain, :primary => true # This is where Rails migrations will run | |
# role :db, "your slave db-server here" | |
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 "/usr/sbin/service glassfish-example_app stop" | |
end | |
desc "Starts a server running GlassFish gem" | |
task :start do | |
run "/usr/sbin/service glassfish-example_app start" | |
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