File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ BUILD_DIR=$APP_DIR
103103
104104# Set up outputs under new context
105105PROFILE_PATH=" $BUILD_DIR /.profile.d/python.sh"
106- WEBCONCURRENCY_PROFILE_PATH =" $BUILD_DIR /.profile.d/python.webconcurrency .sh"
106+ GUNICORN_PROFILE_PATH =" $BUILD_DIR /.profile.d/python.gunicorn .sh"
107107
108108# We'll need to send these statics to other scripts we `source`.
109109export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
@@ -221,8 +221,8 @@ set-default-env LANG en_US.UTF-8
221221set-default-env PYTHONHASHSEED random
222222set-default-env PYTHONPATH /app/
223223
224- # Install sane-default script for WEB_CONCURRENCY environment variable .
225- cp $ROOT_DIR /vendor/python.webconcurrency .sh $WEBCONCURRENCY_PROFILE_PATH
224+ # Install sane-default script for $ WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS .
225+ cp $ROOT_DIR /vendor/python.gunicorn .sh $GUNICORN_PROFILE_PATH
226226
227227
228228# Experimental post_compile hook.
Original file line number Diff line number Diff line change 11case $( ulimit -u) in
22
3- # 1X DYNO
3+ # Automatic configuration for Gunicorn's Workers setting.
4+
5+ # Standard-1X (+Free, +Hobby) Dyno
46256)
57 export DYNO_RAM=512
68 export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 2}
79 ;;
810
9- # 2X DYNO
11+ # Standard- 2X Dyno
1012512)
1113 export DYNO_RAM=1024
1214 export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 4}
1315 ;;
1416
15- # IX DYNO
17+ # Performance-M Dyno
161816384)
1719 export DYNO_RAM=2560
1820 export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 8}
1921 ;;
2022
21- # PX DYNO
23+ # Performance-L Dyno
222432768)
2325 export DYNO_RAM=6656
2426 export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 11}
2527 ;;
2628
2729esac
30+
31+ # Automatic configuration for Gunicorn's ForwardedAllowIPS setting.
32+ export FORWARDED_ALLOW_IPS=' *'
You can’t perform that action at this time.
0 commit comments