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:
commit
f2a7de1082
8 changed files with 36 additions and 27 deletions
|
@ -11,7 +11,7 @@
|
||||||
setup_private=1
|
setup_private=1
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
upgrade=1 from_commit=f59da0dcbc1f35f98fbe32001e0a695171328001
|
upgrade=1 from_commit=0bc4b329402773653e4a70adf6a397c5cefea947
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
incorrect_path=1
|
incorrect_path=1
|
||||||
|
@ -33,6 +33,6 @@
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=f59da0dcbc1f35f98fbe32001e0a695171328001
|
; commit=0bc4b329402773653e4a70adf6a397c5cefea947
|
||||||
name=Fix install and upgrade
|
name=Fix dependances for stretch, from old_version_for_CI_1 branch
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&
|
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&
|
||||||
|
|
|
@ -4,15 +4,12 @@ location __PATH__ {
|
||||||
if ($scheme = http) {
|
if ($scheme = http) {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
try_files $uri @searx;
|
|
||||||
}
|
|
||||||
|
|
||||||
location @searx {
|
|
||||||
uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__';
|
uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__';
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_modifier1 30;
|
uwsgi_modifier1 30;
|
||||||
uwsgi_pass unix:///run/uwsgi/app/searx/socket;
|
uwsgi_pass unix:///run/uwsgi/app/searx/socket;
|
||||||
}
|
|
||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@ chmod-socket = 666
|
||||||
single-interpreter = true
|
single-interpreter = true
|
||||||
master = true
|
master = true
|
||||||
plugin = python
|
plugin = python
|
||||||
|
lazy-apps = true
|
||||||
|
enable-threads = true
|
||||||
|
|
||||||
# Application base folder
|
# Application base folder
|
||||||
base = __FINALPATH__
|
base = __FINALPATH__
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
},
|
},
|
||||||
"version": "0.14.0~ynh1",
|
"version": "0.14.0~ynh1",
|
||||||
"url": "https://asciimoo.github.io/searx/",
|
"url": "https://asciimoo.github.io/searx/",
|
||||||
"license": "AGPLv3",
|
"license": "AGPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "opi",
|
"name": "opi",
|
||||||
"email": "opi@zeropi.net"
|
"email": "opi@zeropi.net"
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC STARTING
|
# GENERIC STARTING
|
||||||
#=================================================
|
|
||||||
# MANAGE FAILURE OF THE SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Exit on command errors and treat unset variables as an error
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -21,6 +14,13 @@ set -eu
|
||||||
# source _common.sh
|
# source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -94,7 +94,9 @@ ynh_setup_source "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
virtualenv --system-site-packages "$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
|
# CONFIGURE SEARX
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC STARTING
|
# GENERIC STARTING
|
||||||
#=================================================
|
|
||||||
# MANAGE FAILURE OF THE SCRIPT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Exit on command errors and treat unset variables as an error
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -21,6 +14,13 @@ fi
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
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
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -59,7 +59,7 @@ ynh_restore_file "$final_path"
|
||||||
# INSTALL DEPENDENCIES
|
# 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
|
# RECREATE OF THE DEDICATED USER
|
||||||
|
|
|
@ -58,6 +58,12 @@ path_url=$(ynh_normalize_url_path $path_url)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# 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
|
# 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-*
|
rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-*
|
||||||
virtualenv --system-site-packages "$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 --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
|
# CONFIGURE SEARX
|
||||||
|
|
Loading…
Reference in a new issue