Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Setting up supervisord in Mac OS X

Installation

Installing Supervisor on OS X is simple:

sudo pip install supervisor

This assumes you have pip. If you don't:

curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py
sudo easy_install pip
sudo pip install supervisor
supervisord -c /path/to/supervisord.conf

Seeing all child processes running

supervisorctl -c /path/to/supervisord.conf

I find it helpful to create an alias in my bash profile for those 2 commands above so that I don't have to manually type -c all the time

echo "alias supervisord='supervisord -c /usr/local/share/supervisor/supervisord.conf'" >> ~/.bash_profile
echo "alias supervisorctl='supervisorctl -c /usr/local/share/supervisor/supervisord.conf'" >> ~/.bash_profile
<!-- /Library/LaunchDaemons/com.agendaless.supervisord.plist -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>com.agendaless.supervisord</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/supervisord</string>
<string>-n</string>
<string>-c</string>
<string>/usr/local/share/supervisor/supervisord.conf</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
[unix_http_server]
file=/usr/local/share/tmp/supervisor.sock
chmod=0700
[supervisord]
logfile = /usr/local/var/log/supervisord.log
logfile_maxbytes = 50MB
logfile_backups=10
loglevel = info
pidfile = /tmp/supervisord.pid
nodaemon = False
minfds = 1024
minprocs = 200
umask = 022
identifier = supervisor
directory = /usr/local/share/tmp
nocleanup = true
childlogdir = /usr/local/share/tmp
[supervisorctl]
serverurl = unix:///usr/local/share/tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[include]
files = /usr/local/share/supervisor/conf.d/*.conf
@fadhlirahim

This comment has been minimized.

Show comment Hide comment
@fadhlirahim

fadhlirahim Aug 29, 2014

Ensure supervisord and supervisorctl is run with the -c option and /path/to/supervisord.conf file

Owner

fadhlirahim commented Aug 29, 2014

Ensure supervisord and supervisorctl is run with the -c option and /path/to/supervisord.conf file

@fadhlirahim

This comment has been minimized.

Show comment Hide comment
@fadhlirahim

fadhlirahim Aug 29, 2014

Optional plist file to run supervisord on startup on your machine.

Owner

fadhlirahim commented Aug 29, 2014

Optional plist file to run supervisord on startup on your machine.

@black-lotus

This comment has been minimized.

Show comment Hide comment
@black-lotus

black-lotus Sep 2, 2015

i can't download from this url http://python-distribute.org/distribute_setup.py
any idea ?
thanks

i can't download from this url http://python-distribute.org/distribute_setup.py
any idea ?
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment