Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

hoptoad support

  • Loading branch information...
commit 39713231a5bb88af90c4fd88956c8775aec94da7 1 parent eaf7ba2
Cyril David authored cyx committed
Showing with 60 additions and 0 deletions.
  1. +4 −0 Capfile
  2. +4 −0 config.ru
  3. +48 −0 config/deploy.rb
  4. +4 −0 mkmf.log
View
4 Capfile
@@ -0,0 +1,4 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+
+load 'config/deploy' # remove this line to skip loading any of the default tasks
View
4 config.ru
@@ -1,6 +1,10 @@
require "init"
+require "rack/hoptoad"
+
+use Rack::Hoptoad, "cc8aa796ba335d9f24549349214a6c32"
Main.set :run, false
Main.set :environment, :production
+Main.set :raise_errors, true
run Main
View
48 config/deploy.rb
@@ -0,0 +1,48 @@
+# -- APP --
+set :application, "boughtstuff"
+
+# -- GIT --
+set :repository, "git@github.com:sinefunc/boughtstuff.git"
+set :scm, :git
+set :branch, 'production'
+set :deploy_via, :remote_cache
+
+# -- RAILS --
+set :rack_env, 'production'
+set :use_sudo, false
+set :ruby_bin, '/opt/mri-1.9.1-boughtstuff/bin'
+
+# -- SSH --
+set :user, 'ubuntu'
+set :port, 22
+ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "sinefunc.pem")]
+
+# -- ROLES --
+role :web, "boughtstuff.com"
+role :app, "boughtstuff.com"
+role :db, "boughtstuff.com", :primary => true
+
+namespace :deploy do
+ task :start do ; end
+ task :stop do ; end
+ task :restart, :roles => :app, :except => { :no_release => true } do
+ run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
+ end
+
+ desc "Create asset packages for production"
+ task :build_assets, :roles => :app do
+ run <<-EOF
+ cd #{release_path} && #{ruby_bin}/rake asset:packager:build_all
+ EOF
+ end
+
+ desc "Upload to S3"
+ task :upload_assets_to_s3, :roles => :app do
+ run <<-EOF
+ cd #{release_path} && #{ruby_bin}/rake asset:upload:s3
+ EOF
+ end
+end
+
+before "deploy:finalize_update", "deploy:build_assets"
+after "deploy:finalize_update", "deploy:upload_assets_to_s3"
View
4 mkmf.log
@@ -0,0 +1,4 @@
+find_executable: checking for git... -------------------- yes
+
+--------------------
+
Please sign in to comment.
Something went wrong with that request. Please try again.