1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-15 09:10:12 +01:00
searxng/docs/admin
Markus Heiser 2039060b64 [mod] revision of the settings_loader
The intention of this PR is to modernize the settings_loader implementations.
The concept is old (remember, this is partly from 2014), back then we only had
one config file, meanwhile we have had a folder with config files for a very
long time.  Callers can now load a YAML configuration from this folder as
follows ::

    settings_loader.get_yaml_cfg('my-config.yml')

- BTW this is a fix of #3557.

- Further the `existing_filename_or_none` construct dates back to times when
  there was not yet a `pathlib.Path` in all Python versions we supported in the
  past.

- Typehints have been added wherever appropriate

At the same time, this patch should also be downward compatible and not
introduce a new environment variable. The localization of the folder with the
configurations is further based on:

    SEARXNG_SETTINGS_PATH (wich defaults to /etc/searxng/settings.yml)

Which means, the default config folder is `/etc/searxng/`.

ATTENTION: intended functional changes!

 If SEARXNG_SETTINGS_PATH was set and pointed to a not existing file, the
 previous implementation silently loaded the default configuration.  This
 behavior has been changed: if the file or folder does not exist, an
 EnvironmentError exception will be thrown in future.

Closes: https://github.com/searxng/searxng/issues/3557
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-07-14 18:10:06 +02:00
..
answer-captcha [doc] answer CAPTCHA from server's IP 2023-05-22 10:46:10 +02:00
settings [mod] revision of the settings_loader 2024-07-14 18:10:06 +02:00
answer-captcha.rst [doc] answer CAPTCHA from server's IP 2023-05-22 10:46:10 +02:00
api.rst [mod] settings.yml: remove plugin settings for plugins that don't exist anymore 2023-09-29 11:26:49 +02:00
arch_public.dot [doc] update documentation of the installation procedures 2022-07-30 13:39:35 +02:00
architecture.rst [docs] corrections from @tiekoetter's review 2022-07-30 13:39:35 +02:00
buildhosts.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00
index.rst [mod] isolation of botdetection from the limiter 2023-11-01 06:44:56 +01:00
installation-apache.rst [fix] spelling 2023-09-18 16:20:27 +02:00
installation-docker.rst Docker: add UWSGI_WORKERS and UWSGI_THREAD environment variables (#2992) 2023-11-12 16:46:34 +00:00
installation-nginx.rst [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
installation-scripts.rst [fix] typos/grammar in docs 2023-04-21 06:51:44 +02:00
installation-searxng.rst [feat] hostname replace plugin: possibility to prioritize certain websites 2024-06-07 14:42:52 +02:00
installation-uwsgi.rst [doc] rearranges Settings & Engines docs for better readability 2023-07-01 22:45:19 +02:00
installation.rst [fix] typos/grammar in docs 2023-04-21 06:51:44 +02:00
plugins.rst [mod] documentation: change the jinja context doesn't depend on searx.webapp 2020-12-27 10:00:35 +01:00
searx.limiter.rst [mod] isolation of botdetection from the limiter 2023-11-01 06:44:56 +01:00
update-searxng.rst [fix] typos in documentation & messages 2023-08-13 08:50:29 +02:00