Files
OSIT-AE-Docker-Env/conf/aether_fastapi_gunicorn_conf.py
Scott Idem 6fd6899879 fix(gunicorn): set control_socket to /dev/shm path
Newer gunicorn (post-23.0.0) added _get_control_socket_path() which
calls os.path.isabs() on the value — crashing when it is None.
Point the socket to /dev/shm (already used for worker_tmp_dir) so it
is writable inside the container and satisfies the new gunicorn code.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 20:24:12 -04:00

31 lines
815 B
Python

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', 30))
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'