felicity-lims/felicity/server/gunicorn-conf.py
2023-04-07 17:52:19 +02:00

27 lines
649 B
Python

import multiprocessing
import os
from dotenv import load_dotenv
load_dotenv()
name = "gunicorn config for Felicity LiMS systemd daemon"
accesslog = "/home/aurthur/Development/Python/felicity/felicity_lims/backend/gunicorn-access.log"
errorlog = (
"/home/aurthur/Development/Python/felicity/felicity_lims/backend/gunicorn-error.log"
)
bind = "0.0.0.0:8000"
worker_class = "uvicorn.workers.UvicornWorker"
workers = multiprocessing.cpu_count() * 2 + 1
worker_connections = 1024
backlog = 2048
max_requests = 5120
timeout = 120
keepalive = 2
debug = os.environ.get("DEBUG", "false") == "true"
reload = debug
preload_app = False
daemon = False