问题描述
我试图使自动部署包括supervisord和默认设置路径困惑。
我发现每个部署方案都使用 /etc/supervisor/supervisor.conf
和 etc / supervisor / conf.d /
,没有任何预置和链接,通过apt-get安装supervisor软件包后,这个路径真的由示例配置填充。
在此流如下所示,没有任何链接和创建 /etc/supervisor.conf
:
sudo('apt- y install supervisor')
put('config / supervisor_gunicorn.conf','/etc/supervisor/conf.d/gunicorn.conf',use_sudo = True)
sudo('supervisorctl reload')
但在 supervisorctl
中,此路径未指定为默认情况下,并假定默认位置在aroud /etc/supervisor.conf
某处,如
我尝试安装主管所有可能的方法,但我无法得到结果。
通常默认文件确实是 /etc/supervisor.conf
,但(链接到Debian提供的gzip补丁)以查找 /etc/supervisor/supervisor.conf
第一个:
---主管-3.0a8.orig / src / supervisor / options.py
+++ supervisor-3.0a8 / src / supervisor / options.py
@@ -105,7 +105,7 @@
def default_configfile(self):
返回找到的配置文件的名称或raise。
paths = ['supervisord.conf','etc / supervisord.conf',
- '/etc/supervisord.conf']
+'/ etc / supervisor / supervisord .conf','/etc/supervisord.conf']
config = None
路径中的路径:
如果os.path.exists(路径):
因此,使用该补丁,管理程序在本地目录中查找 supervisord.conf
,在 etc /
子目录中,然后在全局 / etc / supervisor /
和 etc /
目录。
Debian安装的默认 supervisord.conf
结束时:
[include]
files = /etc/supervisor/conf.d/*.conf
导致supervisord加载 conf.d
目录。
Im trying to make automatic deployment including supervisord and confused by default settings path.
Every deployment scheme i found use /etc/supervisor/supervisor.conf
and /etc/supervisor/conf.d/
without any presettings and links, also, after installing supervisor package via apt-get this path is really filled by example configuration.
In this example flow looks like this without any links and creation anything like /etc/supervisor.conf
:
sudo('apt-get -y install supervisor')
put('config/supervisor_gunicorn.conf', '/etc/supervisor/conf.d/gunicorn.conf', use_sudo=True)
sudo('supervisorctl reload')
But in supervisorctl
this path is not specified as default and it's assumed that default location somewhere aroud /etc/supervisor.conf
so as specified in manual
I've try to install supervisor all possible ways but i can't get result.
I know that this is just small stupid detail, but i will be very grateful for your assistance in keeping my deployment scheme good.
Normally the default file is indeed /etc/supervisor.conf
, but the Debian distribution patches this (link to the gzipped patch as provided by Debian) to look for /etc/supervisor/supervisor.conf
first:
--- supervisor-3.0a8.orig/src/supervisor/options.py
+++ supervisor-3.0a8/src/supervisor/options.py
@@ -105,7 +105,7 @@
def default_configfile(self):
"""Return the name of the found config file or raise. """
paths = ['supervisord.conf', 'etc/supervisord.conf',
- '/etc/supervisord.conf']
+ '/etc/supervisor/supervisord.conf', '/etc/supervisord.conf']
config = None
for path in paths:
if os.path.exists(path):
So with that patch, supervisor looks for supervisord.conf
in the local directory, in the etc/
subdirectory, then in the global /etc/supervisor/
and /etc/
directories.
The default supervisord.conf
file installed by Debian has this at the end:
[include]
files = /etc/supervisor/conf.d/*.conf
causing supervisord to load any extra files put in the conf.d
directory.
这篇关于supervisor.conf默认位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!