File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ from dotenv import load_dotenv
2+ import os
3+ import multiprocessing
4+
5+ load_dotenv ()
6+
7+ bind = os .environ .get ('GUNICORN_BIND' , '0.0.0.0:8000' )
8+ workers = multiprocessing .cpu_count () * 2 + 1
9+ worker_class = 'uvicorn.workers.UvicornWorker'
10+ reload = True
11+
12+ loglevel = os .environ .get ('LOG_LEVEL' , 'info' )
13+ accesslog = '-'
14+ errorlog = '-'
15+
16+ timeout = 60
17+ graceful_timeout = 15
18+ keepalive = 5
19+ worker_timeout = 60
20+ max_requests = 1000
21+ max_requests_jitter = 50
22+ max_request_jitter = 100
23+ start_class = "gunicorn.workers.ggevent.GeventWorker"
24+ preload_app = True
25+ daemon = False
26+ pidfile = '/var/run/gunicorn.pid'
27+ proc_name = 'openai_api_client'
28+ raw_env = ["OPENAI_API_KEY=" + os .environ ["OPENAI_API_KEY" ],
29+ "DATABASE_URL=" + os .environ ["DATABASE_URL" ],
30+ "SECRET_KEY=" + os .environ ["SECRET_KEY" ],
31+ "LOG_LEVEL=" + os .environ ["LOG_LEVEL" ]]
You can’t perform that action at this time.
0 commit comments