mirror of
https://github.com/YunoHost-Apps/peertube-search-index_ynh.git
synced 2024-09-03 19:56:30 +02:00
Rename config file and do not override default config
This commit is contained in:
parent
ba0f6a2720
commit
c1d2add304
4 changed files with 17 additions and 89 deletions
|
@ -1,87 +0,0 @@
|
||||||
listen:
|
|
||||||
hostname: 'localhost'
|
|
||||||
port: __PORT__
|
|
||||||
|
|
||||||
webserver:
|
|
||||||
https: false
|
|
||||||
hostname: 'localhost'
|
|
||||||
port: __PORT__
|
|
||||||
|
|
||||||
elastic-search:
|
|
||||||
hostname: 'localhost'
|
|
||||||
port: __ES_PORT__
|
|
||||||
indexes:
|
|
||||||
videos: 'peertube-index-videos'
|
|
||||||
channels: 'peertube-index-channels'
|
|
||||||
|
|
||||||
log:
|
|
||||||
level: 'debug' # debug/info/warning/error
|
|
||||||
|
|
||||||
search-instance:
|
|
||||||
name: 'PeerTube Search Index'
|
|
||||||
|
|
||||||
# Set an image instead of displaying your website title in text at the top of the search page
|
|
||||||
# Must be a relative URL. For example if you use a theme: /theme/mytheme/img/title.svg
|
|
||||||
name_image: ''
|
|
||||||
|
|
||||||
# The image between the title and the search bar
|
|
||||||
search_image: ''
|
|
||||||
|
|
||||||
description: 'A search engine of PeerTube videos and channels, developed by Framasoft'
|
|
||||||
legal_notices_url: ''
|
|
||||||
theme: 'default'
|
|
||||||
|
|
||||||
instances-index:
|
|
||||||
# Contains PeerTube instance hosts the indexer will index
|
|
||||||
# Must answer the following format: https://framagit.org/framasoft/peertube/instances-peertube#peertube-auto-follow-global-search
|
|
||||||
url: 'https://instances.joinpeertube.org/api/v1/instances/hosts'
|
|
||||||
|
|
||||||
# A public URL that will be displayed in the search page
|
|
||||||
# So your users can see what instances your search instance indexed
|
|
||||||
public_url: 'https://instances.joinpeertube.org'
|
|
||||||
|
|
||||||
# Useful to do tests
|
|
||||||
whitelist:
|
|
||||||
enabled: false
|
|
||||||
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 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
|
|
||||||
search-fields:
|
|
||||||
name:
|
|
||||||
boost: 5
|
|
||||||
description:
|
|
||||||
boost: 1
|
|
||||||
tags:
|
|
||||||
boost: 3
|
|
||||||
account-display-name:
|
|
||||||
boost: 2
|
|
||||||
channel-display-name:
|
|
||||||
boost: 2
|
|
||||||
|
|
||||||
channels-search:
|
|
||||||
# Add ability to change channels search fields boost 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
|
|
||||||
search-fields:
|
|
||||||
name:
|
|
||||||
boost: 5
|
|
||||||
description:
|
|
||||||
boost: 1
|
|
||||||
display-name:
|
|
||||||
boost: 3
|
|
||||||
account-display-name:
|
|
||||||
boost: 2
|
|
||||||
|
|
||||||
api:
|
|
||||||
# Blacklist hosts that will not be returned by the search API
|
|
||||||
blacklist:
|
|
||||||
enabled: false
|
|
||||||
# Array of hosts
|
|
||||||
hosts: null
|
|
15
conf/production.yaml
Normal file
15
conf/production.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
listen:
|
||||||
|
hostname: 'localhost'
|
||||||
|
port: __PORT__
|
||||||
|
|
||||||
|
webserver:
|
||||||
|
https: false
|
||||||
|
hostname: 'localhost'
|
||||||
|
port: __PORT__
|
||||||
|
|
||||||
|
elastic-search:
|
||||||
|
hostname: 'localhost'
|
||||||
|
port: __ES_PORT__
|
||||||
|
indexes:
|
||||||
|
videos: 'peertube-index-videos'
|
||||||
|
channels: 'peertube-index-channels'
|
|
@ -123,7 +123,7 @@ popd
|
||||||
ynh_script_progression --message="Adding a config file..."
|
ynh_script_progression --message="Adding a config file..."
|
||||||
|
|
||||||
es_port=$(ynh_app_setting_get --app=elasticsearch8 --key=port)
|
es_port=$(ynh_app_setting_get --app=elasticsearch8 --key=port)
|
||||||
ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml"
|
ynh_add_config --template="../conf/production.yaml" --destination="$final_path/config/production.yaml"
|
||||||
|
|
||||||
chmod 400 "$final_path/config/production.yaml"
|
chmod 400 "$final_path/config/production.yaml"
|
||||||
chown $app:$app "$final_path/config/production.yaml"
|
chown $app:$app "$final_path/config/production.yaml"
|
||||||
|
|
|
@ -134,7 +134,7 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a config file..."
|
ynh_script_progression --message="Updating a config file..."
|
||||||
|
|
||||||
ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml"
|
ynh_add_config --template="../conf/production.yaml" --destination="$final_path/config/production.yaml"
|
||||||
|
|
||||||
chmod 400 "$final_path/config/production.yaml"
|
chmod 400 "$final_path/config/production.yaml"
|
||||||
chown $app:$app "$final_path/config/production.yaml"
|
chown $app:$app "$final_path/config/production.yaml"
|
||||||
|
|
Loading…
Add table
Reference in a new issue