forked from pedroaxl/opsworks-resque
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add environment variables via upstart and switch from su to sudo
- Loading branch information
Noah Blumenthal
committed
Dec 7, 2014
1 parent
fbc10ae
commit 95a59db
Showing
3 changed files
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
#!upstart | ||
description "Resque worker <%= @instance %> <%= @queue %>" | ||
respawn | ||
|
||
start on starting resque | ||
stop on stopping resque | ||
|
||
exec su - deploy -c 'cd <%= @deploy[:deploy_to] %>/current/; QUEUE=<%= @queue %> VERBOSE=1 RAILS_ENV=<%= @deploy[:rails_env] %> <%= @env %> bundle exec rake resque:work >> /var/log/resque/<%= @application %>-<%= @instance %>.log 2>&1' | ||
env QUEUE=<%= @queue %> | ||
env RAILS_ENV=<%= @deploy[:rails_env] %> | ||
env TERM_CHILD=1 | ||
|
||
chdir <%= @deploy[:deploy_to] %>/current | ||
|
||
exec sudo -u deploy -E -- bundle exec rake resque:work >> /var/log/resque/<%= @application %>-<%= @instance %>.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters