﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	parents
860	supervisor control files	Guillaume Hayot		"In the [http://mediagoblin.readthedocs.org/en/latest/siteadmin/production-deployments.html Considerations for Production Deployments], there are a few distribution specific init scripts mentionned. Here's a more cross-system one, using Supervisor, a process control system. On Debian, it's more reliable than [https://github.com/joar/mediagoblin-init-scripts joar's MediaGoblin init scripts], as it doesn't fail at restarting them.

I suggest to add the following ""init method"" for Debian in the documentation mentionned above.

The Paster FCGI server supervisor file, with MediaGoblin's documentation paths.

{{{
[program:mediagoblin-paster]
command = /srv/mediagoblin.example.org/mediagoblin/bin/paster serve /srv/mediagoblin.example.org/mediagoblin/paste_local.ini --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
directory = /srv/mediagoblin.example.org/mediagoblin
user = mediagoblin
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/mediagoblin-paster.log
stderr_logfile = /var/log/supervisor/mediagoblin-paster_err.log
environment = CELERY_ALWAYS_EAGER=false
}}}

The Celery task processor supervisor file, with MediaGoblin's documentation paths.

{{{
[program:mediagoblin-celeryd]
command = /srv/mediagoblin.example.org/mediagoblin/bin/celeryd
directory = /srv/mediagoblin.example.org/mediagoblin
user = mediagoblin
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/mediagoblin-celeryd.log
stderr_logfile = /var/log/supervisor/mediagoblin-celeryd_err.log
environment = CELERY_CONFIG_MODULE=""mediagoblin.init.celery.from_celery""
}}}

I'm not a supervisor-guru, I just followed these [http://supervisord.org/configuration.html#program-x-section-values Section Values] in supervisor's configuration documentation, so anyone is free to improve it, of course !"	enhancement	closed	minor		documentation	no-action	supervisor process celeryd paster		
