Commit 84e2a513 authored by Kenneth Reitz's avatar Kenneth Reitz

support for FORWARDED_ALLOW_IPS='*'

parent f1c2bc39
...@@ -103,7 +103,7 @@ BUILD_DIR=$APP_DIR ...@@ -103,7 +103,7 @@ BUILD_DIR=$APP_DIR
# Set up outputs under new context # Set up outputs under new context
PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh" PROFILE_PATH="$BUILD_DIR/.profile.d/python.sh"
WEBCONCURRENCY_PROFILE_PATH="$BUILD_DIR/.profile.d/python.webconcurrency.sh" GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
# We'll need to send these statics to other scripts we `source`. # We'll need to send these statics to other scripts we `source`.
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
...@@ -221,8 +221,8 @@ set-default-env LANG en_US.UTF-8 ...@@ -221,8 +221,8 @@ set-default-env LANG en_US.UTF-8
set-default-env PYTHONHASHSEED random set-default-env PYTHONHASHSEED random
set-default-env PYTHONPATH /app/ set-default-env PYTHONPATH /app/
# Install sane-default script for WEB_CONCURRENCY environment variable. # Install sane-default script for $WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS.
cp $ROOT_DIR/vendor/python.webconcurrency.sh $WEBCONCURRENCY_PROFILE_PATH cp $ROOT_DIR/vendor/python.gunicorn.sh $GUNICORN_PROFILE_PATH
# Experimental post_compile hook. # Experimental post_compile hook.
......
case $(ulimit -u) in case $(ulimit -u) in
# 1X DYNO # Automatic configuration for Gunicorn's Workers setting.
# Standard-1X (+Free, +Hobby) Dyno
256) 256)
export DYNO_RAM=512 export DYNO_RAM=512
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-2} export WEB_CONCURRENCY=${WEB_CONCURRENCY:-2}
;; ;;
# 2X DYNO # Standard-2X Dyno
512) 512)
export DYNO_RAM=1024 export DYNO_RAM=1024
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-4} export WEB_CONCURRENCY=${WEB_CONCURRENCY:-4}
;; ;;
# IX DYNO # Performance-M Dyno
16384) 16384)
export DYNO_RAM=2560 export DYNO_RAM=2560
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-8} export WEB_CONCURRENCY=${WEB_CONCURRENCY:-8}
;; ;;
# PX DYNO # Performance-L Dyno
32768) 32768)
export DYNO_RAM=6656 export DYNO_RAM=6656
export WEB_CONCURRENCY=${WEB_CONCURRENCY:-11} export WEB_CONCURRENCY=${WEB_CONCURRENCY:-11}
;; ;;
esac esac
# Automatic configuration for Gunicorn's ForwardedAllowIPS setting.
export FORWARDED_ALLOW_IPS='*'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment