From f61c918dd4ea211f32874f1072ecfca0f39fcca4 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 29 Jun 2021 20:08:10 +0200 Subject: [mod] normalize .config.sh with settings.yml In commit 94851790 we have centralized all SearXNG setups in the settings.yml file: 94851790 [mod] move brand options from Makefile to settings.yml This step has not yet been completed for the installation procedures! Since all SearXNG setups are done in the settings.yml these environment variables needs to be removed from the ./conf.sh file. Scripts and other tasks running outside of an instance got the needed values from the ./utils/brand.env file. By example: ATM the environment variables of the ./config.sh file are in conflict with them from settings.yml: - PUBLIC_URL --> {server:base_url} - SEARX_INTERNAL_HTTP --> {server:bind_address}.{server:port} - GIT_BRANCH --> {brand:GIT_URL} These environment variable of a SearXNG instance and additional - SEARX_SETTINGS_TEMPLATE has been remove from the '.config.sh' file. With this patch, the main focus of ./conf.sh resists on environment variables needed for the installation of morty, filtron software. modified .config.sh: - removed no longer supported variables (see above) - add comment about: SearXNG setup in settings.yml modified utils/searx.sh: - SEARX_INTERNAL_HTTP no longer take from .config.sh - SEARX_SETTINGS_PATH /etc/searx/settings.yml - SEARX_SETTINGS_TEMPLATE obsolete modified utils/lib_install.sh: Initialize environment variables SEARX_PYENV, SEARX_SETTINGS_PATH and PUBLIC_URL. modified: utils/morty.sh Add missing hint about SEARX_SETTINGS_PATH and move PUBLIC_URL to utils/lib_install.sh modified: utils/morty.sh Move PUBLIC_URL to utils/lib_install.sh Renamed utils/templates/etc/searx/use_default_settings.yml -> settings.yml - removed option which can't be modified after installation - add some comments with examples Signed-off-by: Markus Heiser --- utils/templates/etc/searx/settings.yml | 52 ++++++++++++++++++++++ utils/templates/etc/searx/use_default_settings.yml | 34 -------------- 2 files changed, 52 insertions(+), 34 deletions(-) create mode 100644 utils/templates/etc/searx/settings.yml delete mode 100644 utils/templates/etc/searx/use_default_settings.yml (limited to 'utils/templates') diff --git a/utils/templates/etc/searx/settings.yml b/utils/templates/etc/searx/settings.yml new file mode 100644 index 000000000..8fb29319f --- /dev/null +++ b/utils/templates/etc/searx/settings.yml @@ -0,0 +1,52 @@ +# SearXNG settings, before editing this file read: +# +# ${DOCS_URL}/admin/engines/settings.html + +use_default_settings: true + +general: + # Debug mode, only for development + debug: false + # change displayed name + # instance_name: "SearXNG" + +search: + # Filter results. 0: None, 1: Moderate, 2: Strict + safe_search: 0 + # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", + # "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off + # by default. + autocomplete: '' + # Default search language - leave blank to detect from browser information or + # use codes from 'languages.py' + default_lang: '' + # remove format to deny access, use lower case. + formats: [html, csv, json, rss] + +server: + secret_key: "ultrasecretkey" # change this! + # Proxying image results through searx + image_proxy: false + +# result_proxy: +# url: http://127.0.0.1:3000/ +# key: !!binary "your_morty_proxy_key" + +# plugins: +# - only_show_green_results + +# engines: +# +# - name: duckduckgo +# disabled: false +# +# - name: fdroid +# disabled: false +# +# - name: apk mirror +# disabled: false +# +# - name: mediathekviewweb +# engine: mediathekviewweb +# shortcut: mvw +# categories: general diff --git a/utils/templates/etc/searx/use_default_settings.yml b/utils/templates/etc/searx/use_default_settings.yml deleted file mode 100644 index 1e7530cdc..000000000 --- a/utils/templates/etc/searx/use_default_settings.yml +++ /dev/null @@ -1,34 +0,0 @@ -use_default_settings: true - -general: - debug: false # Debug mode, only for development - instance_name: "searxng" # displayed name - contact_url: false # mailto:contact@example.com - -search: - # Filter results. 0: None, 1: Moderate, 2: Strict - safe_search: 0 - # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", - # "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off - # by default. - autocomplete: "" - # Default search language - leave blank to detect from browser information or - # use codes from 'languages.py' - default_lang: "" - # remove format to deny access, use lower case. - formats: [html, csv, json, rss] - -server: - port: 8888 - # address to listen on - bind_address: "127.0.0.1" - secret_key: "ultrasecretkey" # change this! - # Set custom base_url. Possible values: - # false or "https://your.custom.host/location/" - # base_url: https://example.org/searx - # Proxying image results through searx - image_proxy: false - -# result_proxy: -# url: http://127.0.0.1:3000/ -# key: !!binary "your_morty_proxy_key" -- cgit v1.2.3