lib/cap_recipes/tasks/play.rb in uhl-cap-recipes-0.1.1 vs lib/cap_recipes/tasks/play.rb in uhl-cap-recipes-0.1.2
- old
+ new
@@ -1,24 +1,24 @@
# -*- coding: utf-8 -*-
Capistrano::Configuration.instance(true).load do |configuration|
set :use_sudo, true
- _cset :deploy_to_parent, "/srv/applications"
+ _cset :deploy_to_parent, "/app"
_cset :branch, "master"
default_run_options[:pty] = true
# this is capistrano's default location.
# depending on the permissions of the server
# you may need to create it and chown it over
# to :user (e.g. chown -R robotuser:robotuser /u)
set :deploy_to do
- "#{deploy_to_parent}/#{application}"
+ "#{deploy_to_parent}/deploy"
end
set :deploy_to_gitrepo do
- "#{deploy_to}/repo"
+ "#{deploy_to}/#{application}"
end
set :local_base_dir do
"#{`pwd`}".strip
@@ -31,14 +31,13 @@
_cset :_config, Array.new
_cset :build_name, "ROOT"
_cset :build_path, "not set.war"
_cset :servers, ""
- _cset :deploy_to, ""
set :local_git_dir do
- "/tmp/localgit_#{application}"
+ "/app/tmp/localgit_#{application}"
end
set :local_gitrepo do
"#{local_git_dir}/#{application}"
end
@@ -51,22 +50,22 @@
end
namespace :play do
desc "start service"
- task :start_service do
+ task :start do
sudo "/etc/init.d/#{service_name} start"
end
desc "stop service"
- task :stop_service do
+ task :stop do
sudo "/etc/init.d/#{service_name} stop"
end
desc "stop and start service"
- task :restart_service do
- play.stop_service
- play.start_service
+ task :restart do
+ play.stop
+ play.start
end
desc "setup remote and locate play dir"
task :setup do
play.setup_remote