Skip to content

Instantly share code, notes, and snippets.

@justsee
justsee / sv-unicorn-run.erb
Last active December 14, 2015 04:09 — forked from brentkirby/service
Chef + runit + Unicorn + rbenv
#!/bin/bash -e
export RBENV_ROOT=/usr/local/rbenv
export PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/bin:"$PATH"
APP="<%= @options[:app].application.name %>"
APP_PATH="<%= @options[:app].path %>"
RAILS_ENV="<%= @options[:rails_env] %>"
UNICORN_CONFIG="/etc/unicorn/${APP}.rb"
CUR_PID_FILE="${APP_PATH}/shared/pids/unicorn.pid"