Created
November 8, 2012 01:47
-
-
Save gphat/4035968 to your computer and use it in GitHub Desktop.
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
require 'rubygems' | |
require 'railsless-deploy' | |
# Your application name | |
set :application, "someapp" | |
# We're not deploying from a repo, since this is scala and we | |
# need to compile. Set SCM to none | |
set :scm, :none | |
# Our deploy is to copy the contents of… | |
set :deploy_via, :copy | |
# the target directory! In this case repository is really | |
# a pointer to the directory | |
set :repository, "target" | |
# You can use multiple here, if that's what you have | |
role :web, "app1.example.com" | |
# Deploying to AWS? Remove this and put your key path here. | |
#ssh_options[:keys] = [File.join(ENV["HOME"], "mykey.pem")] | |
set :deploy_to, "/home/someapp" | |
set :user, "someapp" | |
set :use_sudo, false | |
# Skip bits in "target" that we don't want. | |
set :copy_exclude, ["streams", "scala*"] | |
after "deploy:restart", "deploy:cleanup" | |
namespace :deploy do | |
# Override start run current/start. The options are options to play | |
# specifying a config file and pidfile | |
task :start do | |
run "nohup current/start -Dconfig.file=/home/someapp/production.conf -Dpidfile.path=/home/someapp/someapp.pid >/dev/null 2>&1 &" | |
end | |
# Handle killing a running instance | |
task :stop do | |
run "kill -15 `cat /home/someapp/someapp.pid`" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment