Rewrite uwsgi to use the helper
This commit is contained in:
@@ -13,5 +13,5 @@ location __PATH__/ {
|
||||
uwsgi_read_timeout 3600;
|
||||
uwsgi_param SCRIPT_NAME __PATH__;
|
||||
uwsgi_modifier1 30;
|
||||
uwsgi_pass unix:///tmp/__NAME__.socket;
|
||||
uwsgi_pass unix:///var/run/uwsgi/__NAME__.socket;
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
[Unit]
|
||||
Description=uWSGI instance for __APP__
|
||||
Requires=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=__APP__
|
||||
Group=__APP__
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=__FINALPATH__
|
||||
ExecStart=/usr/bin/uwsgi \
|
||||
--ini __FINALPATH__/syncserver.ini \
|
||||
--socket /tmp/__APP__.socket
|
||||
Restart=always
|
||||
StandardError=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
20
conf/uwsgi-app@.service
Normal file
20
conf/uwsgi-app@.service
Normal file
@@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=%i uWSGI app
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/uwsgi \
|
||||
--ini /etc/uwsgi/apps-available/%i.ini \
|
||||
--socket /var/run/uwsgi/%i.socket \
|
||||
--chmod-socket=775 \
|
||||
--logto /var/log/uwsgi/app/%i
|
||||
User=%i
|
||||
Group=www-data
|
||||
Restart=on-failure
|
||||
KillSignal=SIGQUIT
|
||||
Type=notify
|
||||
StandardError=syslog
|
||||
NotifyAccess=all
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -2,13 +2,12 @@
|
||||
plugins = python
|
||||
master = true
|
||||
protocol = uwsgi
|
||||
socket = /tmp/__APP__.socket
|
||||
socket = /var/run/uwsgi/__APP__.socket
|
||||
virtualenv = __FINALPATH__/local
|
||||
wsgi-file = __FINALPATH__/syncserver.wsgi
|
||||
python-path = __FINALPATH__/local
|
||||
enable-threads = true
|
||||
close-on-exec = true
|
||||
umask = 0660
|
||||
|
||||
[app:main]
|
||||
use = egg:syncserver
|
||||
Reference in New Issue
Block a user