-
-
Save oleander/7c12888132885a7f06db 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" | |
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
require "bundler/capistrano" | |
require "whenever/capistrano" | |
set :application, "my-app" | |
set :domain, "example.com" | |
set :bundle_runner, "bundle exec" | |
# Git | |
set :scm, :git | |
set :repository, "git@bitbucket.org:user/my-app.git" | |
set :branch, "master" | |
# Config | |
role :app, domain | |
set :deploy_to, "/opt/apps/#{application}" | |
set :deploy_via, :remote_cache | |
set :keep_releases, 5 | |
set :git_enable_submodules, 1 | |
set :git_shallow_clone, 1 | |
# User | |
set :user, "webmaster" | |
set :use_sudo, false | |
# SSH | |
ssh_options[:paranoid] = false | |
ssh_options[:forward_agent] = true | |
set :bundle_cmd, "bundle" | |
set :bundle_without, [:test, :development] | |
set :bundle_flags, "--deployment --without=development,test" | |
set :normalize_asset_timestamps, false | |
namespace :whenever do | |
desc "Update the crontab file" | |
task :update_crontab, roles: :app do | |
run "cd #{release_path} && #{bundle_runner} whenever --update-crontab #{application}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment