Permalink
Browse files

first cut of capistrano and rack config files

  • Loading branch information...
1 parent d13100f commit 3a2e5382626ccd7cccd6b7429d37997202144a32 @stevenwilkin committed Aug 27, 2009
Showing with 38 additions and 0 deletions.
  1. +24 −0 Capfile
  2. +14 −0 config.ru
View
24 Capfile
@@ -0,0 +1,24 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+
+set :application, "istrending.com"
+
+# server config
+role :app, application
+set :deploy_to, "/var/www/#{application}"
+set :use_sudo, false
+ssh_options[:forward_agent] = true
+
+# git config
+set :git_path_prefix, "git@github.com:stevenwilkin"
+set :repository, "#{git_path_prefix}/#{application}.git"
+set :scm, 'git'
+set :branch, 'master'
+set :scm_verbose, true
+
+# deploying to Passenger so app is restarted by touching tmp/restart.txt
+namespace :deploy do
+ desc "Restart Application"
+ task :restart do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+end
View
14 config.ru
@@ -0,0 +1,14 @@
+require 'rubygems'
+require 'sinatra'
+
+# we're using Passenger do don't start Mongrel
+disable :run
+
+# enable production logging
+set :raise_errors, true
+log = File.new("log/sinatra.log", "a")
+STDOUT.reopen(log)
+STDERR.reopen(log)
+
+require 'istrending.com.rb'
+run Sinatra::Application

0 comments on commit 3a2e538

Please sign in to comment.