Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
add unicorn run script
Browse files Browse the repository at this point in the history
dwradcliffe committed Jun 18, 2014
1 parent eed3484 commit fe0eed2
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@ GRAPH
rubygems-sensu (>= 0.0.0)
rubygems-ssh (>= 0.0.0)
rubygems-utility (>= 0.0.0)
rubygems-app (0.0.12)
rubygems-app (0.0.13)
apt (>= 0.0.0)
chef-vault (>= 0.0.0)
git (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-app/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'rubygems-app'

version '0.0.12'
version '0.0.13'

depends 'apt'
depends 'chef-vault'
13 changes: 13 additions & 0 deletions cookbooks/rubygems-app/templates/default/sv-unicorn-run.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

cd /applications/rubygems/current

export REDISTOGO_URL="<%= @options[:redis_url] %>"

exec 2>&1
exec <%= node[:runit][:chpst_bin] %> \
-u <%= @options[:owner] %>:<%= @options[:group] %> \
<%= @options[:bundler] ? "#{@options[:bundle_command]} exec" : '' %> \
<%= @options[:smells_like_rack] ? 'unicorn' : 'unicorn_rails' %> \
-E <%= @options[:rails_env] %> \
-c /etc/unicorn/<%= @options[:name] %>.rb

0 comments on commit fe0eed2

Please sign in to comment.