[2025-04-10] Add gunicorn config and requirements.txt
https://developers.redhat.com/articles/2023/08/17/how-deploy-flask-application-python-gunicorn
This commit is contained in:
parent
8b1fdab3b9
commit
282698f9ac
2 changed files with 11 additions and 0 deletions
9
gunicorn_config.py
Normal file
9
gunicorn_config.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
import os
|
||||
|
||||
workers = int(os.environ.get('GUNICORN_PROCESSES', '2'))
|
||||
threads = int(os.environ.get('GUNICORN_THREADS', '4'))
|
||||
# timeout = int(os.environ.get('GUNICORN_TIMEOUT', '120'))
|
||||
bind = os.environ.get('GUNICORN_BIND', '0.0.0.0:8080')
|
||||
|
||||
forwarded_allow_ips = '*'
|
||||
secure_scheme_headers = { 'X-Forwarded-Proto': 'https' }
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
Flask==3.1.0
|
||||
Gunicorn==23.0.0
|
Loading…
Add table
Add a link
Reference in a new issue