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.
This commit is contained in:
Scott Idem
2026-03-24 15:41:54 -04:00
parent facf453991
commit 8c9d263afb
2 changed files with 6 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ errorlog = "/logs/gunicorn_error.log" # "-" # stderr
# "logfile" does not seem to actually do anything
# logfile = "/logs/gunicorn.log" # "-" # stderr
# Disable control socket to prevent permission issues on volume mounts
control_socket = None
bind = "0.0.0.0:5005"
# bind = "unix:/tmp/gunicorn.sock"

View File

@@ -6,6 +6,9 @@ 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"