Files
OSIT-AE-Docker-Env/conf/aether_fastapi_gunicorn_conf.py
Scott Idem 8c9d263afb Disable Gunicorn control_socket in FastAPI configs
Gunicorn 25.1.0+ enables a 'control_socket' by default, which creates
a root-owned 'gunicorn.ctl' file in the chdir directory. When this
directory is a volume mount (as in our dev/test setups), it causes
permission errors during Docker build context gathering.

This change explicitly sets 'control_socket = None' to prevent the
creation of this file.
2026-03-24 15:41:54 -04:00

31 lines
785 B
Python

import os
# Gunicorn config variables
loglevel = os.getenv('AE_LOG_LVL', 'warning')
accesslog = "-" # stdout
errorlog = "-" # stderr
# Disable control socket to prevent permission issues on volume mounts
control_socket = None
# ... (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'