Skip to content

Commit

Permalink
Merge pull request #65 from geoadmin/feat-BGDIINF_SB-2648-gunicorn-wo…
Browse files Browse the repository at this point in the history
…rkers

BGDIINF_SB-2648: Made the gunicorn worker tmp dir configurable
  • Loading branch information
ltshb authored Oct 25, 2022
2 parents d1c220b + d287ab5 commit 68f84ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,4 @@ The service is configured by Environment Variable:
| SCRIPT_NAME | `''` | If the service is behind a reverse proxy and not served at the root, the route prefix must be set in `SCRIPT_NAME`. |
| CACHE_CONTROL | `no-cache, no-store, must-revalidate` | Cache Control header value of the GET endpoint(s) |
| CACHE_CONTROL_4XX | `public, max-age=3600` | Cache Control header for 4XX responses |
| GUNICORN_WORKER_TMP_DIR | `/tmp/gunicorn_workers` | Gunicorn worker tmp directory. :warning: This directory should be on **TMPFS** for better performance. |
1 change: 1 addition & 0 deletions wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def load(self):
'timeout': 60,
'logconfig_dict': get_logging_cfg(),
'forwarded_allow_ips': os.getenv('FORWARED_ALLOW_IPS', '*'),
'worker_tmp_dir': os.getenv("GUNICORN_WORKER_TMP_DIR", "/tmp/gunicorn_workers"),
'secure_scheme_headers':
{
os.getenv('FORWARDED_PROTO_HEADER_NAME', 'X-Forwarded-Proto').upper(): 'https'
Expand Down

0 comments on commit 68f84ba

Please sign in to comment.