38 lines
733 B
Python
38 lines
733 B
Python
# Gunicorn configuration file for production
|
|
|
|
# Server socket
|
|
bind = "0.0.0.0:5000"
|
|
backlog = 2048
|
|
|
|
# Worker processes
|
|
workers = 4
|
|
worker_class = "sync"
|
|
worker_connections = 1000
|
|
timeout = 120
|
|
keepalive = 5
|
|
max_requests = 1000
|
|
max_requests_jitter = 100
|
|
preload_app = True
|
|
|
|
# Security
|
|
limit_request_line = 4094
|
|
limit_request_fields = 100
|
|
limit_request_field_size = 8190
|
|
|
|
# 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 = 'lms-c'
|
|
|
|
# Server mechanics
|
|
user = 'app'
|
|
group = 'app'
|
|
tmp_upload_dir = None
|
|
|
|
# SSL (uncomment and configure if using SSL)
|
|
# keyfile = '/path/to/keyfile'
|
|
# certfile = '/path/to/certfile' |