In commit 4b43775c9 the brand.git_url & brand.git_branch has been removed, with
this patch these settings are removed from the documentation.
docs/admin/engines/settings.rst
- Remove brand.git_url & brand.git_branch
docs/dev/makefile.rst
- Remove brand.git_url & brand.git_branch
modified docs/dev/lxcdev.rst
- Remove brand.git_url & brand.git_branch
- fix searXNG to SearXNG
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Not all settings from the 'brand:' section of the YAML files are needed in the
shell scripts. This patch reduce the variables in ./utils/brand.env to what is
needed. The following ('brand:' settings) can be removed from this file:
- ISSUE_URL
- DOCS_URL
- PUBLIC_INSTANCES
- WIKI_URL
Tasks running outside of an *installed instance*, need the following settings
from the YAML configuration:
- GIT_URL <--> brand.git_url
- GIT_BRANCH <--> brand.git_branch
- SEARX_URL <--> server.base_url (aka PUBLIC_URL)
- SEARX_PORT <--> server.port
- SEARX_BIND_ADDRESS <--> server.bind_address
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
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 <markus.heiser@darmarit.de>
modified docs/admin/engines/settings.rst
- Fix documentation and add section 'brand'.
- Add remarks about **buildenv** variables.
- Add remarks about settings from environment variables $SEARX_DEBUG,
$SEARX_PORT, $SEARX_BIND_ADDRESS and $SEARX_SECRET
modified docs/admin/installation-searx.rst & docs/build-templates/searx.rst
Fix template location /templates/etc/searx/settings.yml
modified docs/dev/makefile.rst
Add description of the 'make buildenv' target and describe
- we have all SearXNG setups are centralized in the settings.yml file
- why some tasks need a utils/brand.env (aka instance's buildenv)
modified manage
Settings file from repository's working tree are used by default and
ask user if a /etc/searx/settings.yml file exists.
modified searx/settings.yml
Add comments about when it is needed to run 'make buildenv'
modified searx/settings_defaults.py
Default for server:port is taken from enviroment variable SEARX_PORT.
modified utils/build_env.py
- Some defaults in the settings.yml are taken from the environment,
e.g. SEARX_BIND_ADDRESS (searx.settings_defaults.SHEMA). When the
'brand.env' file is created these enviroment variables should be
unset first.
- The CONTACT_URL enviroment is not needed in the utils/brand.env
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The blog article 'Query your local search engines' has been renamed 'Local
Search Engines', revised and moved into admin's chapter 'Engine & Settings'.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This patch is a marginal revision of the article "settings.yml", most changes
are from normalizing the YAML syntax.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
- Split chapter "Engines" and rename it into "Engines & Settings"
- Move docs/admin/engines.rst -> docs/admin/engines/engine_settings.rst
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
The article "Command line engines" should be in admin's engine
documentation (like the recoll engine).
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
- add sidebars with addition infos about commands and docker in general
- fix long lines & indentation
- correct link to https://github.com/searxng/searxng-docker
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Add script docker-entrypoint.sh to shellcheck and try to _simplify_ and
_normalize_ some parts:
- fix issues reported by shellcheck
- don't mix tab and space indent
- command 'help' replaced by '-h': ./dockerfiles/docker-entrypoint.sh -h
- replace printf in help() by 'cat <<EOF'
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
make docker.buildx : build and push multiarch build.
(it can't be only build)
use buildx with the --cache-from and --cache-to options to cache the layers
(only the last built is cached)
settings.yml:
* outgoing.networks:
* can contains network definition
* propertiers: enable_http, verify, http2, max_connections, max_keepalive_connections,
keepalive_expiry, local_addresses, support_ipv4, support_ipv6, proxies, max_redirects, retries
* retries: 0 by default, number of times searx retries to send the HTTP request (using different IP & proxy each time)
* local_addresses can be "192.168.0.1/24" (it supports IPv6)
* support_ipv4 & support_ipv6: both True by default
see https://github.com/searx/searx/pull/1034
* each engine can define a "network" section:
* either a full network description
* either reference an existing network
* all HTTP requests of engine use the same HTTP configuration (it was not the case before, see proxy configuration in master)
Before this commit, in the documentation, the jinja context is 'webapp' and contains
the global variable in the searx.webapp module.
This commit changes this to include only the mandatory variables to build the
documentation.
see searx.search.processors.abstract.EngineProcessor
First the method searx call the get_params method.
If the return value is not None, then the searx call the method search.
Since #2291 is merged, it is recommend to use::
use_default_settings=True
1. Add a template file use_default_settings.yml::
SEARX_SETTINGS_TEMPLATE="${REPO_ROOT}/utils/templates/etc/searx/use_default_settings.yml"
2. In Chapter "Configuration" recommend to make use of
'use_default_settings=True' and describe it
3. Rewrite of docs/admin/settings.rst
- move chapter 'settings.yml location' to the top
- update and split chapter 'Global Settings'
4. Add environment SEARX_SETTINGS_TEMPLATE to .config.sh
5. Use environment $SEARX_SETTINGS_TEMPLATE in the utils/searx.sh script
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
recoll is a local search engine based on Xapian:
http://www.lesbonscomptes.com/recoll/
By itself recoll does not offer web or API access,
this can be achieved using recoll-webui:
https://framagit.org/medoc92/recollwebui.git
This engine uses a custom 'files' result template
set `base_url` to the location where recoll-webui can be reached
set `dl_prefix` to a location where the file hierarchy as indexed by recoll can be reached
set `search_dir` to the part of the indexed file hierarchy to be searched, use an empty string to search the entire search domain
This change is backward compatible with the existing configurations.
If a settings.yml loaded from an user defined location (SEARX_SETTINGS_PATH or /etc/searx/settings.yml),
then this settings can relied on the default settings.yml with this option:
user_default_settings:True
The $DOCS_BUILD variable (like all BUILD variables) in the lxc environment::
sudo -H ./utils/lxc.sh cmd searx-archlinux make docs
is different from running build process in the HOST::
make docs
with kernel-include directive we can use the environment variables in the reST
documents to address the correct file location of the include.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
A new option is added to engines to hide error messages from users. It
is called `display_error_messages` and by default it is set to `True`.
If it is set to `False` error messages do not show up on the UI.
Keep in mind that engines are still suspended if needed regardless of
this setting.
Closes#1828
This is the revision of the documentation about the varous nginx installation
variants. It also implements the nginx installation scripts for morty and
filtron.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
We explicitly specific the static directory here using alias to allow to
host from a other subdirectory than "searx" which just so happens to
match the source code directory.
Closes: #1617
There is an issue with the setup example in https://asciimoo.github.io/searx/dev/install/installation.html#installation for subdirectory URL deployments:
```nginx
root /usr/local/searx;
location = /searx { rewrite ^ /searx/; }
try_files $uri @searx;
}
location @searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_modifier1 30;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
```
`try_files` causes Nginx to search for files in the server root first. If it matches a file, it is returned. Only if no file matched, the request is passed to uwsgi. The worst consequence I can think of is that `settings.yml` can be downloaded without authentication (where secrets and configuration details are stored).
To fix this, I propose:
```nginx
location = /searx {
rewrite ^ /searx/;
}
location /searx/static {
}
location /searx {
uwsgi_param SCRIPT_NAME /searx;
include uwsgi_params;
uwsgi_pass unix:/run/uwsgi/app/searx/socket;
}
```
And add
```
route-run = fixpathinfo:
```
to `/etc/uwsgi/apps-available/searx.ini` because `uwsgi_modifier1 30` is apparently deprecated. Ref: https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.11.html#fixpathinfo-routing-action
I assume this issue exists because some uwsgi upstream docs also use the `try_files` construct (at least I have seen this somewhere in the docs or somewhere else on the Internet but cannot find it right now again).
https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html#hosting-multiple-apps-in-the-same-process-aka-managing-script-name-and-path-info also warns about this:
> If used incorrectly a configuration like this may cause security problems. For your sanity’s sake, double-triple-quadruple check that your application files, configuration files and any other sensitive files are outside of the root of the static files.
Herein we add some hints and suggestions about typical architectures of
searx infrastructures. We start with a contribution from @dalf
- https://github.com/asciimoo/searx/pull/1776#issuecomment-567917320
thanks @dalf !!
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Normalize reST sources with best practice and KISS in mind.
to name a few points:
- simplify reST tables
- make use of ``literal`` markup for monospace rendering
- fix code-blocks for better rendering in HTML
- normalize section header markup
- limit all lines to a maximum of 79 characters
- add option -H to the sudo command used in code blocks
- drop useless indentation of lists
- ...
[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
docs/admin/filtron.rst:24: \
WARNING: Could not lex literal_block as "json". Highlighting skipped.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>