From c74894f2a15112110a100e871c7c40690796c78a Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Fri, 29 Apr 2011 18:19:40 -0700 Subject: [PATCH] Added details on using runit to the site's deploy section. --- doc/site/deploy.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/site/deploy.rst b/doc/site/deploy.rst index 2ba07dac..08ba098e 100644 --- a/doc/site/deploy.rst +++ b/doc/site/deploy.rst @@ -128,7 +128,7 @@ Runit +++++ A popular method for deploying Gunicorn is to have it monitored by runit_. -An `example service`_ definition:: +Here is an `example service`_ definition:: #!/bin/sh @@ -143,6 +143,15 @@ An `example service`_ definition:: cd $ROOT exec $GUNICORN -c $ROOT/gunicorn.conf.py --pid=$PID $APP +Save this as ``/etc/sv/[app_name]/run``, and make it executable +(``chmod u+x /etc/sv/[app_name]/run``). +Then run ``ln -s /etc/sv/[app_name] /etc/service/[app_name]``. +If runit is installed, gunicorn should start running automatically as soon +as you create the symlink. + +If it doesn't start automatically, run the script directly to troubleshoot. + + Supervisor ++++++++++