Skip to content

Instantly share code, notes, and snippets.

@paneru-rajan
Last active June 1, 2018 06:57
Show Gist options
  • Save paneru-rajan/e6568a5483209c764502ceef2addfa97 to your computer and use it in GitHub Desktop.
Save paneru-rajan/e6568a5483209c764502ceef2addfa97 to your computer and use it in GitHub Desktop.
[Supervisor Config file for django app] Configuration file for django, supervisor and gunicorn #gunicorn #supervisor #django

Supervisor configuraion file

  1. Create a file:
    cd /etc/supervisor/conf.d
    vim test.django.conf
    
  2. Paste content below:
    [program:test.django]
    command=/home/rajan/.virtualenvs/django-Wkqw33bx/bin/gunicorn -b :8080 mysite.wsgi:application
    directory=/extra/localhost/test/django/mysite
    user=nobody
    autostart=true
    autorestart=true
    redirect_stderr=true
    stderr_logfile=/var/log/test.django.err.log
    stdout_logfile=/var/log/test.django.out.log
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment