我正在尝试进行自动部署,包括 supervisord 并被默认设置路径混淆。
我发现的每个部署方案都使用 /etc/supervisor/supervisor.conf
和 /etc/supervisor/conf.d/
没有任何预设和链接,而且,在通过 apt-get 安装 supervisor 包之后,这个路径实际上是由示例配置填充的。
在此 示例 中,流程看起来像这样,没有任何链接和创建类似 /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')
但在 supervisorctl
此路径未指定为默认路径,并且假设默认位置在某处 /etc/supervisor.conf
手册 中指定
我尝试以所有可能的方式安装主管,但我无法获得结果。
我知道这只是愚蠢的小细节,但我将非常感谢您帮助我保持良好的部署方案。
原文由 mrjj 发布,翻译遵循 CC BY-SA 4.0 许可协议
通常 默认文件确实是
/etc/supervisor.conf
,但是 Debian 发行版对此进行了修补(链接到 Debian 提供的 gzip 补丁)以首先查找/etc/supervisor/supervisor.conf
:So with that patch, supervisor looks for
supervisord.conf
in the local directory, in theetc/
subdirectory, then in the global/etc/supervisor/
and/etc/
目录。Debian 安装的默认
supervisord.conf
文件末尾有这个:导致 supervisord 加载放在
conf.d
目录中的任何额外文件。