forked from opf/openproject
-
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.
Support using puma if configured via USE_PUMA=true (multithreading)
- Loading branch information
Showing
8 changed files
with
66 additions
and
15 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
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,4 +1,4 @@ | ||
web: bundle exec unicorn --config-file config/unicorn.rb --host ${HOST:="127.0.0.1"} --port ${PORT:="8080"} --env ${RAILS_ENV:="development"} | ||
web: ./packaging/scripts/web | ||
worker: bundle exec rake jobs:work | ||
backup: ./packaging/scripts/backup | ||
check: ./packaging/scripts/check |
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
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
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,21 @@ | ||
#!/bin/bash -e | ||
|
||
HOST="${HOST:=127.0.0.1}" | ||
PORT="${PORT:=8080}" | ||
RAILS_ENV="${RAILS_ENV:="development"}" | ||
|
||
USE_PUMA="${USE_PUMA:="false"}" | ||
|
||
if [ "$RAILS_ENV" = "production" ] && [ "$USE_PUMA" = "true" ]; then | ||
# @TODO Add apache config to serve the assets. Until then we have Puma serve | ||
# them which is slower. This is ok if an asset host is used (SaaS). | ||
# But for self-hosted installations we may want to fix that. | ||
# Passenger does include a config to have nginx serve the assets. | ||
export OPENPROJECT_ENABLE__INTERNAL__ASSETS__SERVER=true | ||
fi | ||
|
||
if [ "$USE_PUMA" = "true" ]; then | ||
bundle exec rails server puma -b $HOST -p $PORT | ||
else | ||
bundle exec unicorn --config-file config/unicorn.rb --host $HOST --port $PORT --env $RAILS_ENV | ||
fi |