Last active
August 29, 2015 14:17
-
-
Save michiels/5488d8d88be7428483ea to your computer and use it in GitHub Desktop.
intercity CLI deploy.rb
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
set :application, 'APPNAME' | |
set :repo_url, 'git@github.com:YOU/APPNAME.git' | |
# Default branch is :master | |
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp } | |
# Default deploy_to directory is /var/www/my_app | |
set :deploy_to, '/u/apps/APPNAME' | |
# Use agent forwarding for SSH so you can deploy with the SSH key on your workstation. | |
set :ssh_options, { | |
forward_agent: true | |
} | |
# Default value for :pty is false | |
set :pty, true | |
# Default value for :linked_files is [] | |
set :linked_files, %w{config/database.yml} | |
# Default value for linked_dirs is [] | |
set :linked_dirs, %w{.rbenv-vars bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system} | |
# Default value for default_env is {} | |
set :default_env, { path: "/opt/rbenv/shims:$PATH" } | |
set :bundle_bins, fetch(:bundle_bins, []).push("unicorn") | |
# Default value for keep_releases is 5 | |
# set :keep_releases, 5 | |
namespace :deploy do | |
desc 'Restart application' | |
task :restart do | |
on roles(:app), in: :sequence, wait: 5 do | |
execute :touch, release_path.join('tmp/restart.txt') | |
end | |
end | |
after :publishing, :restart | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment