Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
84e2a513
Commit
84e2a513
authored
Feb 12, 2016
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for FORWARDED_ALLOW_IPS='*'
parent
f1c2bc39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
compile
bin/compile
+3
-3
python.gunicorn.sh
vendor/python.gunicorn.sh
+9
-4
No files found.
bin/compile
View file @
84e2a513
...
...
@@ -103,7 +103,7 @@ BUILD_DIR=$APP_DIR
# Set up outputs under new context
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`.
export
BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
...
...
@@ -221,8 +221,8 @@ set-default-env LANG en_US.UTF-8
set-default-env PYTHONHASHSEED random
set-default-env PYTHONPATH /app/
# Install sane-default script for
WEB_CONCURRENCY environment variable
.
cp
$ROOT_DIR
/vendor/python.
webconcurrency.sh
$WEBCONCURRENCY
_PROFILE_PATH
# Install sane-default script for
$WEB_CONCURRENCY and $FORWARDED_ALLOW_IPS
.
cp
$ROOT_DIR
/vendor/python.
gunicorn.sh
$GUNICORN
_PROFILE_PATH
# Experimental post_compile hook.
...
...
vendor/python.
webconcurrency
.sh
→
vendor/python.
gunicorn
.sh
View file @
84e2a513
case
$(
ulimit
-u
)
in
# 1X DYNO
# Automatic configuration for Gunicorn's Workers setting.
# Standard-1X (+Free, +Hobby) Dyno
256
)
export
DYNO_RAM
=
512
export
WEB_CONCURRENCY
=
${
WEB_CONCURRENCY
:-
2
}
;;
#
2X DYNO
#
Standard-2X Dyno
512
)
export
DYNO_RAM
=
1024
export
WEB_CONCURRENCY
=
${
WEB_CONCURRENCY
:-
4
}
;;
#
IX DYNO
#
Performance-M Dyno
16384
)
export
DYNO_RAM
=
2560
export
WEB_CONCURRENCY
=
${
WEB_CONCURRENCY
:-
8
}
;;
# P
X DYNO
# P
erformance-L Dyno
32768
)
export
DYNO_RAM
=
6656
export
WEB_CONCURRENCY
=
${
WEB_CONCURRENCY
:-
11
}
;;
esac
# Automatic configuration for Gunicorn's ForwardedAllowIPS setting.
export
FORWARDED_ALLOW_IPS
=
'*'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment