Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Copyright (c) Adam Strauch
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#####################################################################
uWSGI Manager
This is a forked/modified version of
This is small python script for uWSGI instances. It can read your YAML configuration files and stop/reload/restart/start/what ever with your uWSGI processes. Script works only under root privileges.
Using:
$ sudo mkdir -p /etc/uwsgi/apps-available
$ sudo mkdir -p /etc/uwsgi/apps-enabled
$ sudo vim /etc/uwsgi/apps-available/myapp.yaml
[copy modified configuration below]
$ sudo ln -s /etc/uwsgi/apps-available/myapp.yaml /etc/uwsgi/apps-enabled/myapp
$ uwsgi-manager.py -l
$ uwsgi-manager.py -s myapp
Config file /etc/uwsgi/apps-enabled/myapp.yaml
uwsgi:
master: 1
uid: root
socket: /path/to/uwsgi.sock
pidfile: /path/to/uwsgi.pid
daemonize: /path/to/uwsgi.log
home: /path/to/.virtualenv/project
pythonpath: /path/to/project
wsgi-file: /path/to/project/main.py
module: project # depends on your app
callable: app # depends on your app
This manager assumes uWSGI binary is located at /usr/local/bin/uwsgi
If you are lost, try -h:
$ ./uwsgi-manager.py -h