37 lines
1008 B
Python
37 lines
1008 B
Python
# gunicorn.conf.py
|
|
import multiprocessing
|
|
|
|
# Server socket
|
|
bind = "127.0.0.1:7000"
|
|
backlog = 2048
|
|
|
|
# Worker processes
|
|
worker_class = "eventlet" # Required for Flask-SocketIO
|
|
workers = 1 # eventlet requires exactly 1 worker
|
|
worker_connections = 1000
|
|
timeout = 120
|
|
keepalive = 5
|
|
|
|
# Application
|
|
module = "run:app"
|
|
|
|
# Logging
|
|
accesslog = "logs/gunicorn_access.log"
|
|
errorlog = "logs/gunicorn_error.log"
|
|
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µs'
|
|
|
|
# Process naming
|
|
proc_name = "it_ticket_system"
|
|
|
|
# Server mechanics
|
|
daemon = False
|
|
pidfile = "/tmp/it_tickets.pid"
|
|
user = None # Set to your app user, e.g. "www-data"
|
|
group = None
|
|
tmp_upload_dir = None
|
|
|
|
# SSL (configure if not using nginx for SSL termination)
|
|
# keyfile = "/etc/ssl/private/your.key"
|
|
# certfile = "/etc/ssl/certs/your.crt"
|