This repository has been archived by the owner on Feb 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
4 changed files
with
77 additions
and
0 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,8 @@ | ||
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | ||
|
||
# Uncomment if you are using Rails' asset pipeline | ||
# load 'deploy/assets' | ||
|
||
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } | ||
|
||
load 'config/deploy' # remove this line to skip loading any of the default tasks |
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
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
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,53 @@ | ||
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path. | ||
require "rvm/capistrano" # Load RVM's capistrano plugin. | ||
require "bundler/capistrano" | ||
|
||
set :application, 'api' | ||
set :user, 'spree' | ||
set :group, 'www-data' | ||
set :domain, 'www.spreecommerce.com' | ||
|
||
set :rvm_ruby_string, 'ruby-1.9.2-p290' | ||
|
||
set :scm, :git | ||
|
||
role :web, domain | ||
role :app, domain | ||
role :db, domain, :primary => true | ||
|
||
set :repository, "git://github.com/spree/api.spreecommerce.com" | ||
|
||
#if exists?(:edge) | ||
set :branch, "master" | ||
#else | ||
#set :branch, "1-2-x" | ||
#end | ||
|
||
set :deploy_to, "/data/#{application}" | ||
set :deploy_via, :remote_cache | ||
set :use_sudo, false | ||
|
||
default_run_options[:pty] = true | ||
set :ssh_options, { :forward_agent => true } | ||
|
||
namespace :deploy do | ||
desc "Builds static html for api" | ||
task :build_api do | ||
cmd = "cd #{release_path} && bundle exec nanoc compile" | ||
#cmd << " --edge" if exists?(:edge) | ||
run cmd | ||
end | ||
|
||
# desc "Symlink shared configs and folders on each release." | ||
# task :symlink_shared do | ||
# if exists?(:edge) | ||
# run "ln -nfs #{shared_path}/config/robots.txt #{release_path}/output/robots.txt" | ||
# run "ln -nfs #{shared_path}/config/favicon.ico #{release_path}/output/favicon.ico" | ||
# else | ||
# run "ln -nfs #{shared_path}/legacy #{release_path}/output/legacy" | ||
# end | ||
# end | ||
end | ||
|
||
after 'deploy:update_code', 'deploy:build_api' | ||
#after 'deploy:build_api', 'deploy:symlink_shared' |