在虚拟环境中运行管理器

2024-09-27 00:12:52 发布

您现在位置:Python中文网/ 问答频道 /正文

我在我的虚拟环境(venv)中安装了supervisor和{}。在

我正在使用这个教程:https://realpython.com/blog/python/kickstarting-flask-on-ubuntu-setup-and-deployment/

我很困惑我应该在哪里为supervisor创建config文件,因为默认的etc/supervisor不适用于我。在

supervisorctl文件位于以下目录中:

/home/giri/venv/py2.7/lib/python2.7/site packages/supervisor

我注意到supervisorctl文件中有一行:

Options:
-c/--configuration -- configuration file path (default /etc/supervisord.conf)

每次运行supervisorctl脚本时都需要手动设置此标志还是有其他方法?在

谢谢


Tags: 文件httpscomflaskvenvon虚拟环境etc
1条回答
网友
1楼 · 发布于 2024-09-27 00:12:52

如文档(http://supervisord.org/configuration.html)所示:

The Supervisor configuration file is conventionally named supervisord.conf. It is used by both supervisord and supervisorctl. If either application is started without the -c option (the option which is used to tell the application the configuration filename explicitly), the application will look for a file named supervisord.conf within the following locations, in the specified order. It will use the first file it finds.

  • $CWD/supervisord.conf
  • $CWD/etc/supervisord.conf
  • /etc/supervisord.conf

所以把supervisor.conf放在当前的工作目录中,就可以了。在

相关问题 更多 >

    热门问题