File size: 797 Bytes
e3d8d4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Gunicorn configuration file
import multiprocessing

# Server socket
bind = "0.0.0.0:5000"  # Use port 5000 to match the backend configuration in docker-compose.yml
backlog = 2048

# Worker processes
workers = 2 * multiprocessing.cpu_count() + 1  # Recommended formula
worker_class = "sync"
worker_connections = 1000
timeout = 120  # Increase timeout to match Dockerfile CMD
keepalive = 2
max_requests = 1000
max_requests_jitter = 100

# Logging
accesslog = "-"
errorlog = "-"
loglevel = "info"
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s" %(D)s'

# Process naming
proc_name = "gunicorn_app"

# Server mechanics
preload_app = True
daemon = False
pidfile = "/tmp/gunicorn.pid"
user = None
group = None
tmp_upload_dir = None

# SSL
keyfile = None
certfile = None