Skip to content

Instantly share code, notes, and snippets.

@lukedemi
Created August 9, 2021 21:05
Show Gist options
  • Save lukedemi/3064d25c616a9715eace2cde4bab771c to your computer and use it in GitHub Desktop.
Save lukedemi/3064d25c616a9715eace2cde4bab771c to your computer and use it in GitHub Desktop.
Thunderproof Gunicorn
[supervisord]
nodaemon=true
[program:app]
user=djangouser
directory=/app
command=ddtrace-run gunicorn main.wsgi --workers=1 --timeout 15 -b unix:/var/shared/gunicorn%(process_num)03d.sock --log-file -
numprocs=%(ENV_WORKERS)s
process_name=%(program_name)s_%(process_num)03d
# give processes 180s before killing
stopwaitsecs=180
# process needs to run at least 5s before we mark it as "successful"
startsecs=5
# log redirect all log output to stdout
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment