import os # Gunicorn config variables loglevel = os.getenv('AE_LOG_LVL', 'warning') accesslog = "-" # stdout errorlog = "-" # stderr # Use /dev/shm for the control socket to avoid permission issues on volume mounts control_socket = "/dev/shm/gunicorn.ctl" # ... (existing bind/chdir) ... bind = "0.0.0.0:5005" worker_tmp_dir = "/dev/shm" chdir = "/srv/aether_api" wsgi_app = "app.main:app" # Numeric variables must be integers timeout = int(os.getenv('AE_API_GUNICORN_TIMEOUT', 120)) graceful_timeout = int(os.getenv('AE_API_GUNICORN_GRACEFUL_TIMEOUT', 30)) keepalive = int(os.getenv('AE_API_GUNICORN_KEEPALIVE', 4)) reload = False worker_class = "uvicorn.workers.UvicornWorker" workers = int(os.getenv('AE_API_GUNICORN_WORKERS', 2)) threads = int(os.getenv('AE_API_GUNICORN_THREADS', 2)) # umask = '007'