-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
303c1bf
commit 68a7c0c
Showing
4 changed files
with
78 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | ||
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | ||
load 'config/deploy' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'rubygems' | ||
|
||
if File.directory?(gems_dir = File.join(Dir.pwd, 'gems')) | ||
$BUNDLE = true | ||
Gem.clear_paths | ||
Gem.path.unshift(gems_dir) | ||
end | ||
|
||
require 'merb-core' | ||
|
||
Merb::Config.setup(:merb_root => File.expand_path(File.dirname(__FILE__)), | ||
:environment => ENV['RACK_ENV']) | ||
Merb.environment = Merb::Config[:environment] | ||
Merb.root = Merb::Config[:merb_root] | ||
Merb::BootLoader.run | ||
|
||
run Merb::Rack::Application.new |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
set :keep_releases, 5 | ||
|
||
# server user | ||
set :user, "billtrack" | ||
set :password, "B1ll***Tr@ck" | ||
set :use_sudo, false | ||
set :port, 2002 | ||
default_run_options[:pty] = true | ||
|
||
# application | ||
set :application, "billtrack.org" | ||
set :deploy_to, "/home/#{user}/#{application}" | ||
|
||
# database | ||
set :database, "#{user}" | ||
set :dbuser, user | ||
set :dbpass, password | ||
|
||
# repository | ||
set :repository, "git@ruby_passenger:bill_track.git" | ||
set :deploy_via, :remote_cache | ||
set :scm, :git | ||
set :branch, "master" | ||
set :scm_verbose, true | ||
set :scm_port, 2002 | ||
|
||
# IPs | ||
role :app, "#{user}" | ||
role :web, "#{user}" | ||
role :db, "#{user}", :primary => true | ||
|
||
desc "Link in shared things" | ||
task :after_symlink do | ||
# symlink log path | ||
run "ln -nfs #{shared_path}/log #{release_path}/log" | ||
# config/database | ||
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" | ||
end | ||
|
||
desc "Merb AR migration of database" | ||
deploy.task :migrate, :roles => :app do | ||
run "cd #{current_path}; bin/rake MERB_ENV=production db:migrate" | ||
end | ||
|
||
|
||
desc "Restart Application" | ||
deploy.task :restart, :roles => :app do | ||
run "cd #{current_path}; bin/thor merb:gem:redeploy" | ||
run "touch #{current_path}/tmp/restart.txt" | ||
end | ||
|
||
namespace :merb do | ||
desc "Redeploy Gems" | ||
task :redeploy_gems do | ||
run "cd #{current_path}; bin/thor merb:gem:redeploy" | ||
end | ||
end | ||
|
This file was deleted.
Oops, something went wrong.