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:
parent
932f08b904
commit
4b531bc16f
4 changed files with 19 additions and 33 deletions
|
@ -7,7 +7,7 @@ location __PATH__ {
|
||||||
# Needed for long running operations in admin interface
|
# Needed for long running operations in admin interface
|
||||||
uwsgi_read_timeout 3600;
|
uwsgi_read_timeout 3600;
|
||||||
# Adjust based to uwsgi configuration:
|
# 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;
|
# uwsgi_pass 127.0.0.1:8080;
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
|
|
|
@ -1,34 +1,20 @@
|
||||||
[uwsgi]
|
[uwsgi]
|
||||||
uid = __NAME__
|
plugins = python
|
||||||
gid = users
|
master = true
|
||||||
|
protocol = uwsgi
|
||||||
# the virtualenv (full path)
|
socket = unix:///var/run/uwsgi/__NAME__.socket
|
||||||
home = __FINALPATH__/venv
|
virtualenv = __FINALPATH__/venv
|
||||||
|
wsgi-file = __FINALPATH__/venv/lib/python2.7/site-packages/weblate/wsgi.py
|
||||||
protocol = uwsgi
|
python-path = __FINALPATH__/venv
|
||||||
wsgi-file = __FINALPATH__/venv/lib/python2.7/site-packages/weblate/wsgi.py
|
# In case you're using virtualenv uncomment this:
|
||||||
python-path = __FINALPATH__
|
# virtualenv = /path/to/weblate/virtualenv
|
||||||
# Needed for OAuth/OpenID
|
# Needed for OAuth/OpenID
|
||||||
buffer-size = 8192
|
buffer-size = 8192
|
||||||
# Increase number of workers for heavily loaded sites
|
# Increase number of workers for heavily loaded sites
|
||||||
#workers = 6
|
#workers = 6
|
||||||
# Needed for background processing
|
# Needed for background processing
|
||||||
enable-threads = true
|
enable-threads = true
|
||||||
# Child processes do not need file descriptors
|
# Child processes do not need file descriptors
|
||||||
close-on-exec = true
|
close-on-exec = true
|
||||||
# Avoid default 0000 umask
|
# Avoid default 0000 umask
|
||||||
umask = 0022
|
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
|
|
||||||
|
|
|
@ -4,13 +4,13 @@ Requires=network.target
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=__NAME__
|
||||||
Group=root
|
Group=__NAME__
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
WorkingDirectory=__FINALPATH__
|
WorkingDirectory=__FINALPATH__
|
||||||
ExecStart=/usr/bin/uwsgi --ini-paste /etc/uwsgi/apps-enabled/__NAME__.uwsgi.ini
|
ExecStart=/usr/bin/uwsgi \
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
--ini-paste /etc/uwsgi/apps-enabled/__NAME__.uwsgi.ini \
|
||||||
ExecStop=/bin/kill -INT $MAINPID
|
--socket /var/run/uwsgi/__NAME__.socket
|
||||||
Restart=always
|
Restart=always
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ ynh_app_setting_set $app is_public $is_public
|
||||||
|
|
||||||
ynh_install_app_dependencies libxml2-dev libxslt-dev libfreetype6-dev \
|
ynh_install_app_dependencies libxml2-dev libxslt-dev libfreetype6-dev \
|
||||||
libjpeg-dev libz-dev libyaml-dev python-dev python-pip python-virtualenv \
|
libjpeg-dev libz-dev libyaml-dev python-dev python-pip python-virtualenv \
|
||||||
libmysqlclient-dev
|
libmysqlclient-dev uwsgi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
|
|
Loading…
Reference in a new issue