Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Commit

Permalink
updated to use execjs and therubyracer on production
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanoats committed Mar 5, 2012
1 parent 0004bfd commit 322cdac
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ group :assets do
gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'therubyracer'

gem 'uglifier', '>= 1.0.3'
end

group :production do
gem 'execjs'
gem 'therubyracer'
end

gem 'jquery-rails'
gem 'client_side_validations'

Expand Down
30 changes: 30 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require 'bundler/capistrano'
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
set :rvm_type, :user
require 'rvm/capistrano'
set :application, "recipes"
set :repository, "git@github.com:UWE-Ruby/Recipes.git"

set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`

role :web, "localhost" # Your HTTP server, Apache/etc
role :app, "localhost" # This may be the same as your `Web` server
role :db, "localhost", :primary => true # This is where Rails migrations will run
set :port, 2222
set :user, "vagrant"
set :deploy_to, "/home/vagrant/sites/recipes"
set :keep_releases, 5
set :use_sudo, false
#ssh_options[:keys] = [File.join("Users","ivan","vagrant.d","insecure_private_key")]
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# If you are using Passenger mod_rails uncomment this:
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
end

0 comments on commit 322cdac

Please sign in to comment.