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:
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user