Supervisor/supervisor — Issue #81: Make a counterpart of %(here)s for included configs
Author: tcz
Created: 2012-01-21 23:40:31+00:00
State: open

Hi,

The `%(here)s` placeholder is very useful to set up processes relative to the config file path. However, `%(here)s` used in included configs resolve to the oath of the main config, not the included one.

I suggest another placeholder called, let's say `%(include_here)s`, which would resolve to the path of the included config that contains it.

It would be very useful for the following scenario. I have a webapp which runs some background processes (consuming messages), there is a supervisord config in the repository of the webapp, that is included by the main config, so my `/etc/supervisord.conf` looks like:

; ... blabla
[include]
files = /var/www/config/supervisord_processes.ini

The `supervisord_processes.ini` contains the description of the processes of the webapp, so whenever I do a deployment, I just send a HUP to supervisord, reload the config and I have my background processes restarted with the new code.

The problem is that in the included config I have to use absolute path to my background processes. This is a little bit chaotic when working with several environments (devel, staging, production...) where the place where my code resides could be different.

This is why I need the `%(include_here)s`, to be able to refer to my processes relatively to the checkout path.

By the way, let me tell, I'm amazed by this project, it's really great and exactly was I was looking for.

Thank you for the help!