Run supervisor in virtual environment

user2268507

I installed supervisor and gunicorn in my virtual environment (venv).

I am using this tutorial: https://realpython.com/blog/python/kickstarting-flask-on-ubuntu-setup-and-deployment/

I'm confused as to where I should be creating the config file for supervisor as the default etc/supervisor won't apply to me.

The supervisorctl file is in the directory:

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

I noticed this line in the supervisorctl file:

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

Do I need to manually set this flag each time I run the supervisorctl script or is there another way?

Thanks

tamasgal

As found in the docs (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

So put the supervisor.conf in your current working directory and you're fine.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How to run Spyder in virtual environment?

From Java

Virtual environment in R?

From Java

Do I need to have Python installed on my machine to run a code in a virtual environment?

From Dev

error in python virtual environment

From Dev

Solr virtual or test environment

From Dev

Virtual Environment for Erlang

From Dev

Duplicate the virtual environment for production

From Dev

Understanding virtual environment behavior

From Dev

How to run Elixir Supervisor in escript

From Dev

How can I make an executable python script run inside the current virtual environment?

From Dev

supervisor - how to run multiple commands

From Dev

Using docker environment -e variable in supervisor

From Dev

Run a python script with supervisor

From Dev

Spyder does not run in Anaconda virtual environment on Windows 10

From Dev

How to run ElastAlert with supervisor

From Dev

Access environment variables passed in docker run from supervisor child process

From Dev

cron job to run under conda virtual environment

From Dev

How can I prevent Supervisor to run at startup?

From Dev

Conda: Creating a virtual environment

From Dev

cron job to run under conda virtual environment

From Dev

Run a Process under Supervision using Supervisor

From Dev

How can I prevent Supervisor to run at startup?

From Dev

Virtual Environment for Erlang

From Dev

Duplicate the virtual environment for production

From Dev

Django virtual environment

From Dev

unix:///var/run/supervisor.sock no such file

From Dev

LVM Resizing in a Virtual Environment

From Dev

Xvfb in Python virtual environment

From Dev

Access environment variables passed in docker run from supervisor child process

Related Related

HotTag

Archive