1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00

Merge pull request #38 from YunoHost-Apps/fix_install_in_subpath

Fix install in subpath many other small things
This commit is contained in:
Maniack Crudelis 2018-07-03 14:20:55 +02:00 committed by GitHub
commit f2a7de1082
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 36 additions and 27 deletions

View file

@ -11,7 +11,7 @@
setup_private=1
setup_public=1
upgrade=1
upgrade=1 from_commit=f59da0dcbc1f35f98fbe32001e0a695171328001
upgrade=1 from_commit=0bc4b329402773653e4a70adf6a397c5cefea947
backup_restore=1
multi_instance=0
incorrect_path=1
@ -33,6 +33,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=f59da0dcbc1f35f98fbe32001e0a695171328001
name=Fix install and upgrade
; commit=0bc4b329402773653e4a70adf6a397c5cefea947
name=Fix dependances for stretch, from old_version_for_CI_1 branch
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&

View file

@ -4,15 +4,12 @@ location __PATH__ {
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
try_files $uri @searx;
}
location @searx {
uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__';
include uwsgi_params;
uwsgi_modifier1 30;
uwsgi_pass unix:///run/uwsgi/app/searx/socket;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
}

View file

@ -13,6 +13,8 @@ chmod-socket = 666
single-interpreter = true
master = true
plugin = python
lazy-apps = true
enable-threads = true
# Application base folder
base = __FINALPATH__

View file

@ -9,7 +9,7 @@
},
"version": "0.14.0~ynh1",
"url": "https://asciimoo.github.io/searx/",
"license": "AGPLv3",
"license": "AGPL-3.0-or-later",
"maintainer": {
"name": "opi",
"email": "opi@zeropi.net"

View file

@ -2,13 +2,6 @@
#=================================================
# GENERIC STARTING
#=================================================
# MANAGE FAILURE OF THE SCRIPT
#=================================================
# Exit on command errors and treat unset variables as an error
set -eu
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@ -21,6 +14,13 @@ set -eu
# source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================

View file

@ -94,7 +94,9 @@ ynh_setup_source "$final_path"
#=================================================
virtualenv --system-site-packages "$final_path"
bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt"
set +u; source $final_path/bin/activate; set -u
pip install -U setuptools
pip install --requirement $final_path/requirements-ynh.txt
#=================================================
# CONFIGURE SEARX

View file

@ -2,13 +2,6 @@
#=================================================
# GENERIC STARTING
#=================================================
# MANAGE FAILURE OF THE SCRIPT
#=================================================
# Exit on command errors and treat unset variables as an error
set -eu
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
@ -21,6 +14,13 @@ fi
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# LOAD SETTINGS
#=================================================
@ -59,7 +59,7 @@ ynh_restore_file "$final_path"
# INSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies libxslt-dev virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python
ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python
#=================================================
# RECREATE OF THE DEDICATED USER

View file

@ -58,6 +58,12 @@ path_url=$(ynh_normalize_url_path $path_url)
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_install_app_dependencies git build-essential libxslt-dev python-dev python-virtualenv virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -98,7 +104,9 @@ ynh_system_user_create $app
rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-*
virtualenv --system-site-packages "$final_path"
bash -c "source $final_path/bin/activate && pip install -U setuptools && pip install --requirement $final_path/requirements-ynh.txt --upgrade"
set +u; source $final_path/bin/activate; set -u
pip install -U setuptools
pip install --requirement $final_path/requirements-ynh.txt --upgrade
#=================================================
# CONFIGURE SEARX