mirror of
https://github.com/YunoHost-Apps/peertube-search-index_ynh.git
synced 2024-09-03 19:56:30 +02:00
Merge pull request #36 from YunoHost-Apps/testing
[NEW BRANCH fix-0.0.1.2023.08.08] Fix installation of version (for check_process)
This commit is contained in:
commit
537d315567
9 changed files with 100 additions and 33 deletions
|
@ -6,6 +6,7 @@ It shall NOT be edited by hand.
|
||||||
# PeerTube search-index for YunoHost
|
# PeerTube search-index for YunoHost
|
||||||
|
|
||||||
[![Integration level](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Working status](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
|
[![Integration level](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Working status](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
|
||||||
|
|
||||||
[![Install PeerTube search-index with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
|
[![Install PeerTube search-index with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
@ -18,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
|
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 0.0.1.2022.06.03~ynh1
|
**Shipped version:** 0.0.1.2023.08.08~ynh1
|
||||||
|
|
||||||
**Demo:** https://search.joinpeertube.org/
|
**Demo:** https://search.joinpeertube.org/
|
||||||
|
|
||||||
|
|
23
README_fr.md
23
README_fr.md
|
@ -5,26 +5,27 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# PeerTube search-index pour YunoHost
|
# PeerTube search-index pour YunoHost
|
||||||
|
|
||||||
[![Niveau d'intégration](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
|
[![Niveau d’intégration](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
|
||||||
|
|
||||||
[![Installer PeerTube search-index avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
|
[![Installer PeerTube search-index avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer PeerTube search-index rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d’installer PeerTube search-index rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||||
|
|
||||||
## Vue d'ensemble
|
## Vue d’ensemble
|
||||||
|
|
||||||
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
|
A search engine for [PeerTube](https://joinpeertube.org/) videos and channels, developed by Framasoft.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.0.1.2022.06.03~ynh1
|
**Version incluse :** 0.0.1.2023.08.08~ynh1
|
||||||
|
|
||||||
**Démo :** https://search.joinpeertube.org/
|
**Démo :** https://search.joinpeertube.org/
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d’écran
|
||||||
|
|
||||||
![Capture d'écran de PeerTube search-index](./doc/screenshots/sepia-search-screenshot.png)
|
![Capture d’écran de PeerTube search-index](./doc/screenshots/sepia-search-screenshot.png)
|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
|
@ -38,9 +39,9 @@ To configure this app: modify the file `/var/www/peertube-search-index/config/pr
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l'app : <https://search.joinpeertube.org/>
|
* Site officiel de l’app : <https://search.joinpeertube.org/>
|
||||||
* Documentation officielle de l'admin : <https://framagit.org/framasoft/peertube/search-index>
|
* Documentation officielle de l’admin : <https://framagit.org/framasoft/peertube/search-index>
|
||||||
* Dépôt de code officiel de l'app : <https://framagit.org/framasoft/peertube/search-index>
|
* Dépôt de code officiel de l’app : <https://framagit.org/framasoft/peertube/search-index>
|
||||||
* Documentation YunoHost pour cette app : <https://yunohost.org/app_peertube-search-index>
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_peertube-search-index>
|
||||||
* Signaler un bug : <https://github.com/YunoHost-Apps/peertube-search-index_ynh/issues>
|
* Signaler un bug : <https://github.com/YunoHost-Apps/peertube-search-index_ynh/issues>
|
||||||
|
|
||||||
|
@ -56,4 +57,4 @@ ou
|
||||||
sudo yunohost app upgrade peertube-search-index -u https://github.com/YunoHost-Apps/peertube-search-index_ynh/tree/testing --debug
|
sudo yunohost app upgrade peertube-search-index -u https://github.com/YunoHost-Apps/peertube-search-index_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://framagit.org/framasoft/peertube/search-index/-/archive/b44e850fa1604cebac19eb822e9d555f673085b0/search-index-b44e850fa1604cebac19eb822e9d555f673085b0.tar.gz
|
SOURCE_URL=https://framagit.org/framasoft/peertube/search-index/-/archive/36a36379b469982e6b2fc219825283e2470135e7/search-index-36a36379b469982e6b2fc219825283e2470135e7.tar.gz
|
||||||
SOURCE_SUM=7a68fd70aeaac05d06fbbb3c8cf7a375e9d2e112235e4af6857630380e114b18
|
SOURCE_SUM=d5f92138c38642cb1cf559f2260652203aa38cfd03c5811c49e9299d1cdfe3ef
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -8,11 +8,20 @@ webserver:
|
||||||
port: __PORT__
|
port: __PORT__
|
||||||
|
|
||||||
elastic-search:
|
elastic-search:
|
||||||
|
# https or http
|
||||||
|
http: 'http'
|
||||||
|
auth:
|
||||||
|
username: null
|
||||||
|
password: null
|
||||||
|
ssl:
|
||||||
|
# Specificy a custom CA
|
||||||
|
ca: null
|
||||||
hostname: 'localhost'
|
hostname: 'localhost'
|
||||||
port: 9200
|
port: 9200
|
||||||
indexes:
|
indexes:
|
||||||
videos: 'peertube-index-videos'
|
videos: 'peertube-index-videos'
|
||||||
channels: 'peertube-index-channels'
|
channels: 'peertube-index-channels'
|
||||||
|
playlists: 'peertube-index-playlists'
|
||||||
|
|
||||||
log:
|
log:
|
||||||
level: 'debug' # debug/info/warning/error
|
level: 'debug' # debug/info/warning/error
|
||||||
|
@ -50,34 +59,82 @@ videos-search:
|
||||||
boost-languages:
|
boost-languages:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
# Add ability to change videos search fields boost value
|
# Add ability to change videos search fields boost and match value
|
||||||
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information
|
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information
|
||||||
|
#
|
||||||
# If boost == 0, the field will not be part of the search
|
# If boost == 0, the field will not be part of the search
|
||||||
|
#
|
||||||
|
# match_type could be 'default' or 'phrase'
|
||||||
|
# * default: use default Elastic Search match query, including fuzziness
|
||||||
|
# * phrase: use Elastic Search phrase match query
|
||||||
search-fields:
|
search-fields:
|
||||||
|
uuid:
|
||||||
|
boost: 100
|
||||||
|
match_type: 'default'
|
||||||
|
short-uuid:
|
||||||
|
boost: 100
|
||||||
|
match_type: 'default'
|
||||||
name:
|
name:
|
||||||
boost: 5
|
boost: 5
|
||||||
|
match_type: 'default'
|
||||||
description:
|
description:
|
||||||
boost: 1
|
boost: 1
|
||||||
|
match_type: 'phrase'
|
||||||
tags:
|
tags:
|
||||||
boost: 3
|
boost: 2
|
||||||
|
match_type: 'default'
|
||||||
account-display-name:
|
account-display-name:
|
||||||
boost: 2
|
boost: 2
|
||||||
|
match_type: 'default'
|
||||||
channel-display-name:
|
channel-display-name:
|
||||||
boost: 2
|
boost: 2
|
||||||
|
match_type: 'default'
|
||||||
|
|
||||||
channels-search:
|
channels-search:
|
||||||
# Add ability to change channels search fields boost value
|
# Add ability to change channels search fields boost and match value
|
||||||
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information
|
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information
|
||||||
|
#
|
||||||
# If boost == 0, the field will not be part of the search
|
# If boost == 0, the field will not be part of the search
|
||||||
|
#
|
||||||
|
# match_type could be 'default' or 'phrase'
|
||||||
|
# * default: use default Elastic Search match query, including fuzziness
|
||||||
|
# * phrase: use Elastic Search phrase match query
|
||||||
search-fields:
|
search-fields:
|
||||||
name:
|
name:
|
||||||
boost: 5
|
boost: 5
|
||||||
|
match_type: 'default'
|
||||||
description:
|
description:
|
||||||
boost: 1
|
boost: 1
|
||||||
|
match_type: 'phrase'
|
||||||
display-name:
|
display-name:
|
||||||
boost: 3
|
boost: 3
|
||||||
|
match_type: 'default'
|
||||||
account-display-name:
|
account-display-name:
|
||||||
boost: 2
|
boost: 2
|
||||||
|
match_type: 'default'
|
||||||
|
|
||||||
|
playlists-search:
|
||||||
|
# Add ability to change playlists search fields boost and match value
|
||||||
|
# See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-multi-match-query.html for more information
|
||||||
|
#
|
||||||
|
# If boost == 0, the field will not be part of the search
|
||||||
|
#
|
||||||
|
# match_type could be 'default' or 'phrase'
|
||||||
|
# * default: use default Elastic Search match query, including fuzziness
|
||||||
|
# * phrase: use Elastic Search phrase match query
|
||||||
|
search-fields:
|
||||||
|
uuid:
|
||||||
|
boost: 100
|
||||||
|
match_type: 'default'
|
||||||
|
short-uuid:
|
||||||
|
boost: 100
|
||||||
|
match_type: 'default'
|
||||||
|
display-name:
|
||||||
|
boost: 5
|
||||||
|
match_type: 'default'
|
||||||
|
description:
|
||||||
|
boost: 1
|
||||||
|
match_type: 'phrase'
|
||||||
|
|
||||||
api:
|
api:
|
||||||
# Blacklist hosts that will not be returned by the search API
|
# Blacklist hosts that will not be returned by the search API
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/ ;
|
alias __FINALPATH__/;
|
||||||
|
|
||||||
proxy_pass http://localhost:__PORT__;
|
proxy_pass http://localhost:__PORT__;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Search engine for PeerTube videos and channels",
|
"en": "Search engine for PeerTube videos and channels",
|
||||||
"fr": "Moteur de recherche de vidéos et chaînes PeerTube"
|
"fr": "Moteur de recherche de vidéos et chaînes PeerTube"
|
||||||
},
|
},
|
||||||
"version": "0.0.1.2022.06.03~ynh1",
|
"version": "0.0.1.2023.08.08~ynh1",
|
||||||
"url": "https://search.joinpeertube.org/",
|
"url": "https://search.joinpeertube.org/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
|
|
|
@ -9,7 +9,7 @@ pkg_dependencies="git"
|
||||||
|
|
||||||
extra_pkg_dependencies="elasticsearch-oss"
|
extra_pkg_dependencies="elasticsearch-oss"
|
||||||
|
|
||||||
NODEJS_VERSION=14
|
NODEJS_VERSION=16
|
||||||
|
|
||||||
REPOSITORY="https://framagit.org/framasoft/peertube/search-index"
|
REPOSITORY="https://framagit.org/framasoft/peertube/search-index"
|
||||||
|
|
||||||
|
|
|
@ -86,9 +86,11 @@ ynh_script_progression --message="Setting up source files..."
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
git clone $REPOSITORY $final_path --quiet
|
|
||||||
|
install -d -o $app -g $app -m 0750 $final_path
|
||||||
|
ynh_exec_as $app git clone $REPOSITORY $final_path --quiet
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
git checkout $COMMIT --quiet
|
ynh_exec_as $app git checkout $COMMIT --quiet
|
||||||
popd
|
popd
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
@ -111,11 +113,11 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Building..."
|
ynh_script_progression --message="Building..."
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
git submodule update --init --recursive
|
ynh_exec_as $app git submodule update --init --recursive
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
yarn install --pure-lockfile
|
ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
||||||
mkdir "$final_path/dist"
|
ynh_exec_as $app mkdir -p "$final_path/dist"
|
||||||
$ynh_npm run build
|
ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -63,6 +63,11 @@ if ynh_legacy_permissions_exists; then
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Fix upgrade from 0.0.1.2022.06.03~ynh1
|
||||||
|
chmod 750 "$final_path"
|
||||||
|
chmod -R o-rwx "$final_path"
|
||||||
|
chown -R $app:$app "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -81,9 +86,9 @@ then
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
git checkout master
|
ynh_exec_as $app git checkout master
|
||||||
git pull --quiet
|
ynh_exec_as $app git pull --quiet
|
||||||
git checkout $COMMIT --quiet
|
ynh_exec_as $app git checkout $COMMIT --quiet
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -119,10 +124,11 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
|
||||||
ynh_script_progression --message="Building..."
|
ynh_script_progression --message="Building..."
|
||||||
|
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
git submodule update --init --recursive
|
ynh_exec_as $app git submodule update --init --recursive
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
yarn install --pure-lockfile
|
ynh_exec_as $app env $ynh_node_load_PATH yarn install --pure-lockfile
|
||||||
$ynh_npm run build
|
ynh_exec_as $app mkdir -p "$final_path/dist"
|
||||||
|
ynh_exec_as $app env $ynh_node_load_PATH $ynh_npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue