Skip to content

Instantly share code, notes, and snippets.

@dan
Created February 12, 2017 20:36
Show Gist options
  • Save dan/e81a9de5778743dd5f30476896ca7814 to your computer and use it in GitHub Desktop.
Save dan/e81a9de5778743dd5f30476896ca7814 to your computer and use it in GitHub Desktop.
Deploy a static site with Capistrano 2
# For this to work, you'll need to change:
# :application
# :repository
# :deploy_to
# :user
# :app, :web, :db
set :application, "example.com"
set :repository, "git@github.com:you/example.git"
set :branch, "master"
set :copy_compression, :gzip
set :copy_strategy, :checkout
set :deploy_to, "/path/to/your/web/data/#{application}"
set :deploy_via, :remote_cache
set :keep_releases, 3
set :normalize_asset_timestamps, false
set :scm, :git
set :ssh_options, { forward_agent: true }
set :user, :you
set :use_sudo, false
role :app, "server.example.com"
role :web, "server.example.com"
role :db, "server.example.com"
namespace :deploy do
task :finalize_update do ; end
task :migrate do ; end
task :restart do ; end
task :start do ; end
task :stop do ; end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment