Created
November 24, 2010 21:31
-
-
Save jaredhoyt/714458 to your computer and use it in GitHub Desktop.
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
load 'deploy' if respond_to?(:namespace) | |
# basics | |
set :branch, "master" | |
set :scm, "git" | |
set :deploy_via, :remote_cache | |
# ssh | |
set :user, "shared-user" | |
ssh_options[:forward_agent] = true | |
namespace :deploy do | |
task :default do | |
update | |
end | |
end | |
namespace :symlinks do | |
desc "Create symlinks for ignored folders" | |
task :make, :roles => :app, :except => { :no_release => true } do | |
commands = normal_symlinks.map do |path| | |
"rm -rf #{release_path}/#{path} && ln -s #{shared_path}/#{path} #{release_path}/#{path}" | |
end | |
commands += weird_symlinks.map do |from, to| | |
"rm -rf #{release_path}/#{to} && ln -s #{shared_path}/#{from} #{release_path}/#{to}" | |
end | |
run "cd #{release_path} && #{commands.join(" && ")}" | |
end | |
end | |
after "deploy:update_code", "symlinks:make" |
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
load "../capistrano/deploy" | |
# repository | |
set :application, "capistrano-test" | |
set :repository, "[email protected]:company/test.git" | |
# environments | |
task :staging do | |
role :app, "staging-server" | |
set :deploy_to, "/www/capistrano-test/" | |
end |
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
# GitHub user (jhoyt) | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile u:\.ssh\jhoyt | |
# Deployment user (shared-user) | |
Host staging-server | |
HostName staging-server | |
User shared-user | |
IdentityFile u:\.ssh\shared-user |
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
** [staging-server :: err] Error reading response length from authentication socket. | |
** [staging-server :: err] Permission denied (publickey). | |
** [staging-server :: err] fatal: | |
** [staging-server :: err] The remote end hung up unexpectedly | |
** [staging-server :: err] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment