gitlab-org--gitlab-foss/bin/web
Qingyu Zhao b7ea4bd853 Enable puma by default in GDK
Two changes:
1. Move bin/web to bin/web_unicorn(removed PUMA switching logic)
Introduce new shadow script bin/web. Now we have 3 scripts working
together: bin/web, bin/web_puma, bin/web_unicorn

  In bin/web, it checks ENV['USE_WEB_SERVER']:
    - if value is 'puma' or value is not set, call bin/web_puma
    - if value is 'unicorn', call bin/web_unicorn
    - report error if other values given

2. Gitlab rails allow ENV setting to override timeout
    - ENV['GITLAB_RAILS_RACK_TIMEOUT'] for service_timeout
    - ENV['GITLAB_RAILS_WAIT_TIMEOUT'] for wait_timeout
2019-07-09 23:31:32 +10:00

21 lines
338 B
Bash
Executable file

#!/bin/sh
set -e
cd $(dirname $0)/..
app_root=$(pwd)
case "$USE_WEB_SERVER" in
puma|"") # and the "" defines default
exec bin/web_puma "$@"
;;
unicorn)
exec bin/web_unicorn "$@"
;;
*)
echo "Unkown web server used by USE_WEB_SERVER: $USE_WEB_SERVER."
exit 1
;;
esac