Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f0738773f1
Fetching contributors…

Cannot retrieve contributors at this time

42 lines (29 sloc) 0.836 kb
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'railsless-deploy'
require 'capistrano-cowboy'
default_run_options[:pty] = true
set :user, "ec2-user"
set :application, 'my-movies'
set :deploy_to, "/srv/#{application}"
server "app", :app
after "deploy", "deploy:symlink_dodgy"
after "deploy", "deploy:smoke"
namespace :deploy do
task :symlink_dodgy do
run "#{sudo} ln -sf #{current_path} #{current_path}/#{application}"
end
task :smoke do
command = []
command << "curl"
command << %(--write-out "HTTP %{http_code}, %{time_total} second response time\n")
command << "--location"
command << "--silent"
command << "--output /dev/null"
command << "http://app/my-movies/"
command = command.join(' ')
puts "Running smoke test.\n\n"
system(command)
end
end
Jump to Line
Something went wrong with that request. Please try again.