Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from longnguyen11288/master
Added support to thin to have specify number of thin workers
- Loading branch information
Showing
5 changed files
with
19 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
#!/bin/sh | ||
|
||
if user is root | ||
then | ||
log error "Thin ${action} may be run only as a non-root user." | ||
fi | ||
|
||
source "$HOME/.env" # This file should load the ruby environment & define 'port' | ||
|
||
exec thin restart \ | ||
--address 0.0.0.0 \ | ||
--environment ${environment} \ | ||
--chdir "$HOME/active/${project}" \ | ||
--log "$HOME/shared/log/${environment}.log" \ | ||
--tag ${project}:${environment} \ | ||
--port ${port} -s2 \ | ||
--pid /var/run/${project}/thin.pid | ||
--port ${port} -s${thin_worker} \ | ||
--pid "$HOME/shared/pids/${project}.pid" | ||
|
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,18 +1,11 @@ | ||
#!/bin/sh | ||
|
||
if user is root | ||
then | ||
log error "Thin ${action} may be run only as a non-root user." | ||
fi | ||
|
||
source "$HOME/.env" # This file should load the ruby environment & define 'port' | ||
|
||
exec thin start \ | ||
--address 0.0.0.0 \ | ||
--environment ${environment} \ | ||
--chdir "$HOME/active/${project}" \ | ||
--log "$HOME/shared/log/${environment}.log" \ | ||
--tag ${project}:${environment} \ | ||
--port ${port} -s2 \ | ||
--port ${port} -s${thin_worker} \ | ||
--pid "$HOME/shared/pids/${project}.pid" | ||
|
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,18 +1,11 @@ | ||
#!/bin/sh | ||
|
||
if user is root | ||
then | ||
log error "Thin ${action} may be run only as a non-root user." | ||
fi | ||
|
||
source "$HOME/.env" # This file should load the ruby environment & define 'port' | ||
|
||
exec thin stop \ | ||
--address 0.0.0.0 \ | ||
--environment ${environment} \ | ||
--chdir "$HOME/active/${project}" \ | ||
--log "$HOME/shared/log/${environment}.log" \ | ||
--tag ${project}:${environment} \ | ||
--port ${port} -s2 \ | ||
--pid /var/run/${project}/thin.pid | ||
--port ${port} -s${thin_worker} \ | ||
--pid "$HOME/shared/pids/${project}.pid" | ||
|
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 +1,2 @@ | ||
api/user | ||
api/variables |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
|
||
if user is root | ||
then | ||
log error "Thin ${action} may be run only as a non-root user." | ||
fi | ||
|
||
if variable is empty thin_worker | ||
then | ||
export thin_worker=2 | ||
fi | ||
|
||
source "$HOME/.env" # This file should load the ruby environment & define 'port' |