Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use current_path vs Rubber.root for Unicorn stuff.

  • Loading branch information...
commit c7488247ed2383819498f9eb74d032f09c9ad484 1 parent 961195a
Nick Messick authored
View
3  templates/unicorn/config/rubber/role/unicorn/unicorn-upstart.conf
@@ -1,5 +1,6 @@
<%
@path = "/etc/init/unicorn.conf"
+ current_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current"
@backup = false
%>
description "unicorn daemon"
@@ -8,5 +9,5 @@ start on runlevel [2345]
stop on runlevel [016]
script
- exec /bin/bash -l -c 'cd <%= Rubber.root %> && exec bundle exec unicorn_rails -c <%= Rubber.root %>/config/unicorn.rb -E <%= Rubber.env %> -D >> log/unicorn_upstart.log 2>&1'
+ exec /bin/bash -l -c 'cd <%= current_path %> && exec bundle exec unicorn_rails -c <%= current_path %>/config/unicorn.rb -E <%= Rubber.env %> -D >> log/unicorn_upstart.log 2>&1'
end script
View
3  templates/unicorn/config/rubber/role/unicorn/unicorn.rb
@@ -1,5 +1,6 @@
<%
@path = "#{Rubber.root}/config/unicorn.rb"
+ current_path = "/mnt/#{rubber_env.app_name}-#{Rubber.env}/current"
%>
worker_processes 2
working_directory "<%= Rubber.root %>"
@@ -26,7 +27,7 @@
# Read about Unicorn, Capistrano, and Bundler here:
# http://unicorn.bogomips.org/Sandbox.html
before_exec do |server|
- ENV['BUNDLE_GEMFILE'] = "<%= Rubber.root %>/Gemfile"
+ ENV['BUNDLE_GEMFILE'] = "<%= current_path %>/Gemfile"
end
before_fork do |server, worker|
Please sign in to comment.
Something went wrong with that request. Please try again.