1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/weblate_ynh.git synced 2024-10-01 13:35:04 +02:00

uwsgi rewrite

This commit is contained in:
Jean-Baptiste Holcroft 2017-09-18 15:08:21 +02:00
parent 932f08b904
commit 4b531bc16f
4 changed files with 19 additions and 33 deletions

View file

@ -7,7 +7,7 @@ location __PATH__ {
# Needed for long running operations in admin interface
uwsgi_read_timeout 3600;
# Adjust based to uwsgi configuration:
uwsgi_pass unix:///opt/__NAME__/uwsgi.sock;
uwsgi_pass unix:///var/run/uwsgi/__NAME__.socket
# uwsgi_pass 127.0.0.1:8080;
# Include SSOWAT user panel.

View file

@ -1,13 +1,13 @@
[uwsgi]
uid = __NAME__
gid = users
# the virtualenv (full path)
home = __FINALPATH__/venv
plugins = python
master = true
protocol = uwsgi
socket = unix:///var/run/uwsgi/__NAME__.socket
virtualenv = __FINALPATH__/venv
wsgi-file = __FINALPATH__/venv/lib/python2.7/site-packages/weblate/wsgi.py
python-path = __FINALPATH__
python-path = __FINALPATH__/venv
# In case you're using virtualenv uncomment this:
# virtualenv = /path/to/weblate/virtualenv
# Needed for OAuth/OpenID
buffer-size = 8192
# Increase number of workers for heavily loaded sites
@ -18,17 +18,3 @@ enable-threads = true
close-on-exec = true
# Avoid default 0000 umask
umask = 0022
# process-related settings
# master
master = true
# maximum number of worker processes
processes = 4
# the socket (use the full path to be safe
socket = /opt/__NAME__/uwsgi.sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
stats = /opt/__NAME__/stats.sock
# clear environment on exit
vacuum = true
plugins = python

View file

@ -4,13 +4,13 @@ Requires=network.target
After=network.target
[Service]
User=root
Group=root
User=__NAME__
Group=__NAME__
RemainAfterExit=yes
WorkingDirectory=__FINALPATH__
ExecStart=/usr/bin/uwsgi --ini-paste /etc/uwsgi/apps-enabled/__NAME__.uwsgi.ini
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/bin/kill -INT $MAINPID
ExecStart=/usr/bin/uwsgi \
--ini-paste /etc/uwsgi/apps-enabled/__NAME__.uwsgi.ini \
--socket /var/run/uwsgi/__NAME__.socket
Restart=always
StandardError=syslog

View file

@ -73,7 +73,7 @@ ynh_app_setting_set $app is_public $is_public
ynh_install_app_dependencies libxml2-dev libxslt-dev libfreetype6-dev \
libjpeg-dev libz-dev libyaml-dev python-dev python-pip python-virtualenv \
libmysqlclient-dev
libmysqlclient-dev uwsgi
#=================================================
# CREATE A MYSQL DATABASE