Skip to content

Instantly share code, notes, and snippets.

@jasonamyers
Created February 24, 2013 18:51
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save jasonamyers/5025011 to your computer and use it in GitHub Desktop.
Save jasonamyers/5025011 to your computer and use it in GitHub Desktop.
A sample supervisor config file
; Sample supervisor config file.
;
; For more information on the config file, please see:
; http://supervisord.org/configuration.html
;
; Note: shell expansion ("~" or "$HOME") is not supported. Environment
; variables can be expanded using this syntax: "%(ENV_HOME)s".
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
[supervisord]
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=false ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200 ; (min. avail process descriptors;default 200)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
; The below sample program section shows all possible program subsection values,
; create one or more 'real' program: sections to be able to control them under
; supervisor.
[program:watchmedo]
command=/usr/local/bin/watchmedo shell-command --patterns "*.py;*.txt" --recursive --command='/
usr/local/bin/supervisorctl restart gunicorn' /var/www/html
process_name=%(program_name)s
directory=/var/www/html
autostart=true
autorestart=true
redirect_stderr=true
[program:gunicorn]
command=/usr/local/bin/gunicorn appname:app -c /opt/appname/gunicorn.conf.py
process_name=%(program_name)s
directory=/var/www/html
user=ubuntu
autostart=true
autorestart=true
redirect_stderr=true
environment=DATABASE_URL='mysql://user:password@appname.crrk2qi8kbp
v.us-east-1.rds.amazonaws.com/appname',ANOTHER_ENV_VARL='http://api.url.com'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment