Basic Gunicorn/Supervisor/Nginx config for deploying Python apps.
May 19, 2020
Python

  • gunicorn_config.py
  • nginx_program_name.conf
  • supersivor.conf
import multiprocessing

bind = '0.0.0.0:8000'
workers = multiprocessing.cpu_count()
worker_class = 'gevent'
accesslog = '/var/log/progam_name/gunicorn/access.log'
errorlog = '/var/log/progam_name/gunicorn/error.log'
loglevel = 'debug'
access_log_format = '[%(h)15s] (%(s)s) [%(D)8sms] %(r)s | %(b)sb'
proc_name = 'progam_name_gunicorn'
timeout = 15

Reach out

© 2024 Chuma Umenze. Some rights reserved.