This commit is contained in:
YunoHost Bot 2024-07-10 07:17:42 +02:00 committed by GitHub
commit 9e7020d9cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 45 additions and 126 deletions

View file

@ -5,7 +5,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://ci-apps.yunohost.org/ci/apps/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)
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
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.2023.08.08~ynh2 **Shipped version:** 1.0.0~ynh1
**Demo:** <https://search.joinpeertube.org/> **Demo:** <https://search.joinpeertube.org/>

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# PeerTube search-index para Yunohost # PeerTube search-index para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
[![Instalar PeerTube search-index con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index) [![Instalar PeerTube search-index con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
@ -19,7 +19,7 @@ No se debe editar a mano.
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.
**Versión actual:** 0.0.1.2023.08.08~ynh2 **Versión actual:** 1.0.0~ynh1
**Demo:** <https://search.joinpeertube.org/> **Demo:** <https://search.joinpeertube.org/>

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# PeerTube search-index YunoHost-erako # PeerTube search-index YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg) [![Integrazio maila](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
[![Instalatu PeerTube search-index YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index) [![Instalatu PeerTube search-index YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
@ -19,7 +19,7 @@ EZ editatu eskuz.
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.
**Paketatutako bertsioa:** 0.0.1.2023.08.08~ynh2 **Paketatutako bertsioa:** 1.0.0~ynh1
**Demoa:** <https://search.joinpeertube.org/> **Demoa:** <https://search.joinpeertube.org/>

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# PeerTube search-index pour YunoHost # PeerTube search-index pour YunoHost
[![Niveau dinté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 dintégration](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/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)
@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
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.2023.08.08~ynh2 **Version incluse:** 1.0.0~ynh1
**Démo:** <https://search.joinpeertube.org/> **Démo:** <https://search.joinpeertube.org/>

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# PeerTube search-index para YunoHost # PeerTube search-index para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
[![Instalar PeerTube search-index con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index) [![Instalar PeerTube search-index con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
@ -19,7 +19,7 @@ NON debe editarse manualmente.
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.
**Versión proporcionada:** 0.0.1.2023.08.08~ynh2 **Versión proporcionada:** 1.0.0~ynh1
**Demo:** <https://search.joinpeertube.org/> **Demo:** <https://search.joinpeertube.org/>

View file

@ -5,7 +5,7 @@
# YunoHost 上的 PeerTube search-index # YunoHost 上的 PeerTube search-index
[![集成程度](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://dash.yunohost.org/appci/app/peertube-search-index) ![工作状态](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg) [![集成程度](https://dash.yunohost.org/integration/peertube-search-index.svg)](https://ci-apps.yunohost.org/ci/apps/peertube-search-index/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/peertube-search-index.maintain.svg)
[![使用 YunoHost 安装 PeerTube search-index](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index) [![使用 YunoHost 安装 PeerTube search-index](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=peertube-search-index)
@ -19,7 +19,7 @@
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.
**分发版本:** 0.0.1.2023.08.08~ynh2 **分发版本:** 1.0.0~ynh1
**演示:** <https://search.joinpeertube.org/> **演示:** <https://search.joinpeertube.org/>

View file

@ -7,17 +7,11 @@ webserver:
hostname: 'localhost' hostname: 'localhost'
port: __PORT__ port: __PORT__
elastic-search: meilisearch:
# https or http host: 'http://127.0.0.1:7700'
http: 'http'
auth: api_key: null
username: null
password: null
ssl:
# Specificy a custom CA
ca: null
hostname: 'localhost'
port: 9200
indexes: indexes:
videos: 'peertube-index-videos' videos: 'peertube-index-videos'
channels: 'peertube-index-channels' channels: 'peertube-index-channels'
@ -54,91 +48,16 @@ instances-index:
enabled: false enabled: false
hosts: null hosts: null
videos-search:
# Allow client to send browser language to boost results score that are in these languages
boost-languages:
enabled: true
# 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
#
# 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'
name:
boost: 5
match_type: 'default'
description:
boost: 1
match_type: 'phrase'
tags:
boost: 2
match_type: 'default'
account-display-name:
boost: 2
match_type: 'default'
channel-display-name:
boost: 2
match_type: 'default'
channels-search:
# 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
#
# 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:
name:
boost: 5
match_type: 'default'
description:
boost: 1
match_type: 'phrase'
display-name:
boost: 3
match_type: 'default'
account-display-name:
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
blacklist: blacklist:
enabled: false enabled: false
# Array of hosts # Array of hosts
hosts: null hosts: null
indexer:
# How many hosts in parallel to index
host_concurrency: 10
# How much time to wait before bulk indexing in Meilisearch data
bulk_indexation_interval_ms: 10000

View file

@ -6,10 +6,10 @@ After=network.target
Type=simple Type=simple
Environment=NODE_ENV=production Environment=NODE_ENV=production
Environment="__YNH_NODE_LOAD_PATH__" Environment="__YNH_NODE_LOAD_PATH__"
Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/sources/config Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/config
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
ExecStart=__YNH_NPM__ start ExecStart=__YNH_NODE__ __INSTALL_DIR__/sources/dist/server.js
WorkingDirectory=__INSTALL_DIR__/sources/ WorkingDirectory=__INSTALL_DIR__/sources/
StandardOutput=syslog StandardOutput=syslog
StandardError=syslog StandardError=syslog

View file

@ -7,7 +7,7 @@ name = "PeerTube search-index"
description.en = "Search engine for PeerTube videos and channels" description.en = "Search engine for PeerTube videos and channels"
description.fr = "Moteur de recherche de vidéos et chaînes PeerTube" description.fr = "Moteur de recherche de vidéos et chaînes PeerTube"
version = "0.0.1.2023.08.08~ynh2" version = "1.0.0~ynh1"
maintainers = ["yalh76"] maintainers = ["yalh76"]
@ -39,8 +39,8 @@ ram.runtime = "2000M"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://framagit.org/framasoft/peertube/search-index/-/archive/316adda0db184cb36f0645a60dc8f6a1611ecd28/search-index-316adda0db184cb36f0645a60dc8f6a1611ecd28.tar.gz" url = "https://framagit.org/framasoft/peertube/search-index/-/archive/v1.0.0/search-index-v1.0.0.tar.bz2"
sha256 = "d5f92138c38642cb1cf559f2260652203aa38cfd03c5811c49e9299d1cdfe3ef" sha256 = "ac45e299480cd87e824fcf9fb5f48446985c58079e8c8d10d34f3cc3492b3267"
# Unused because of submodules... # Unused because of submodules...
prefetch = false prefetch = false
autoupdate.strategy = "latest_gitlab_tag" autoupdate.strategy = "latest_gitlab_tag"
@ -58,10 +58,10 @@ ram.runtime = "2000M"
[resources.apt] [resources.apt]
packages = ["git", ] packages = ["git", ]
[resources.apt.extras.elastic] [resources.apt.extras.meilisearch]
repo = "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" repo = "deb https://apt.fury.io/meilisearch/ /"
key = "https://artifacts.elastic.co/GPG-KEY-elasticsearch" key = ""
packages = ["elasticsearch-oss"] packages = ["meilisearch"]
[resources.apt.extras.yarn] [resources.apt.extras.yarn]
repo = "deb https://dl.yarnpkg.com/debian/ stable main" repo = "deb https://dl.yarnpkg.com/debian/ stable main"

View file

@ -17,15 +17,15 @@ ynh_script_progression --message="Installing NodeJS..."
ynh_install_nodejs --nodejs_version="$NODEJS_VERSION" ynh_install_nodejs --nodejs_version="$NODEJS_VERSION"
#================================================= #=================================================
# START ELASTICSEARCH # START MEILISEARCH
#================================================= #=================================================
ynh_script_progression --message="Starting elasticsearch..." ynh_script_progression --message="Starting meilisearch..."
# Fix permissions in case of remove/reinstall # # Fix permissions in case of remove/reinstall
chown -R elasticsearch:elasticsearch /var/lib/elasticsearch # chown -R meilisearch:meilisearch /var/lib/meilisearch
systemctl enable elasticsearch.service --quiet # systemctl enable meilisearch.service --quiet
systemctl start elasticsearch.service # systemctl start meilisearch.service
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -53,10 +53,10 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Adding a config file..." ynh_script_progression --message="Adding a config file..."
ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml" ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml"
chmod 400 "$install_dir/sources/config/production.yaml" chmod 400 "$install_dir/config/production.yaml"
chown "$app:$app" "$install_dir/sources/config/production.yaml" chown "$app:$app" "$install_dir/config/production.yaml"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION

View file

@ -74,10 +74,10 @@ popd
#================================================= #=================================================
ynh_script_progression --message="Updating a config file..." ynh_script_progression --message="Updating a config file..."
ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml" ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml"
chmod 400 "$install_dir/sources/config/production.yaml" chmod 400 "$install_dir/config/production.yaml"
chown "$app:$app" "$install_dir/sources/config/production.yaml" chown "$app:$app" "$install_dir/config/production.yaml"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS