File tree 2 files changed +12
-7
lines changed 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ BUILD_DIR=$APP_DIR
103
103
104
104
# Set up outputs under new context
105
105
PROFILE_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"
107
107
108
108
# We'll need to send these statics to other scripts we `source`.
109
109
export BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
@@ -221,8 +221,8 @@ set-default-env LANG en_US.UTF-8
221
221
set-default-env PYTHONHASHSEED random
222
222
set-default-env PYTHONPATH /app/
223
223
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
226
226
227
227
228
228
# Experimental post_compile hook.
Original file line number Diff line number Diff line change 1
1
case $( ulimit -u) in
2
2
3
- # 1X DYNO
3
+ # Automatic configuration for Gunicorn's Workers setting.
4
+
5
+ # Standard-1X (+Free, +Hobby) Dyno
4
6
256)
5
7
export DYNO_RAM=512
6
8
export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 2}
7
9
;;
8
10
9
- # 2X DYNO
11
+ # Standard- 2X Dyno
10
12
512)
11
13
export DYNO_RAM=1024
12
14
export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 4}
13
15
;;
14
16
15
- # IX DYNO
17
+ # Performance-M Dyno
16
18
16384)
17
19
export DYNO_RAM=2560
18
20
export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 8}
19
21
;;
20
22
21
- # PX DYNO
23
+ # Performance-L Dyno
22
24
32768)
23
25
export DYNO_RAM=6656
24
26
export WEB_CONCURRENCY=${WEB_CONCURRENCY:- 11}
25
27
;;
26
28
27
29
esac
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