mirror of https://github.com/searxng/searxng.git
SearXNG: partial update: reference /etc/searxng/settings.yml
This commit is contained in:
parent
861925c50f
commit
3fad483b7a
|
@ -25,7 +25,7 @@ settings.yml location
|
||||||
The initial ``settings.yml`` we be load from these locations:
|
The initial ``settings.yml`` we be load from these locations:
|
||||||
|
|
||||||
1. the full path specified in the ``SEARXNG_SETTINGS_PATH`` environment variable.
|
1. the full path specified in the ``SEARXNG_SETTINGS_PATH`` environment variable.
|
||||||
2. ``/etc/searx/settings.yml``
|
2. ``/etc/searxng/settings.yml``
|
||||||
|
|
||||||
If these files don't exist (or are empty or can't be read), SearXNG uses the
|
If these files don't exist (or are empty or can't be read), SearXNG uses the
|
||||||
:origin:`searx/settings.yml` file. Read :ref:`settings use_default_settings` to
|
:origin:`searx/settings.yml` file. Read :ref:`settings use_default_settings` to
|
||||||
|
@ -339,7 +339,7 @@ use_default_settings
|
||||||
|
|
||||||
- :ref:`settings location`
|
- :ref:`settings location`
|
||||||
- :ref:`use_default_settings.yml`
|
- :ref:`use_default_settings.yml`
|
||||||
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
||||||
|
|
||||||
The user defined ``settings.yml`` is loaded from the :ref:`settings location`
|
The user defined ``settings.yml`` is loaded from the :ref:`settings location`
|
||||||
and can relied on the default configuration :origin:`searx/settings.yml` using:
|
and can relied on the default configuration :origin:`searx/settings.yml` using:
|
||||||
|
|
|
@ -75,16 +75,16 @@ Configuration
|
||||||
- :ref:`settings global`
|
- :ref:`settings global`
|
||||||
- :ref:`settings location`
|
- :ref:`settings location`
|
||||||
- :ref:`settings use_default_settings`
|
- :ref:`settings use_default_settings`
|
||||||
- :origin:`/etc/searx/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
- :origin:`/etc/searxng/settings.yml <utils/templates/etc/searx/use_default_settings.yml>`
|
||||||
|
|
||||||
To create a initial ``/etc/searx/settings.yml`` you can start with a copy of the
|
To create a initial ``/etc/searxng/settings.yml`` you can start with a copy of the
|
||||||
file :origin:`utils/templates/etc/searx/use_default_settings.yml`. This setup
|
file :origin:`utils/templates/etc/searx/use_default_settings.yml`. This setup
|
||||||
:ref:`use default settings <settings use_default_settings>` from
|
:ref:`use default settings <settings use_default_settings>` from
|
||||||
:origin:`searx/settings.yml` and is recommended since :pull-searx:`2291` is merged.
|
:origin:`searx/settings.yml` and is recommended since :pull-searx:`2291` is merged.
|
||||||
|
|
||||||
For a *minimal setup*, configure like shown below – replace ``searx@$(uname
|
For a *minimal setup*, configure like shown below – replace ``searx@$(uname
|
||||||
-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
|
-n)`` with a name of your choice, set ``ultrasecretkey`` -- *and/or* edit
|
||||||
``/etc/searx/settings.yml`` to your needs.
|
``/etc/searxng/settings.yml`` to your needs.
|
||||||
|
|
||||||
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
.. kernel-include:: $DOCS_BUILD/includes/searx.rst
|
||||||
:start-after: START searx config
|
:start-after: START searx config
|
||||||
|
|
6
manage
6
manage
|
@ -107,9 +107,9 @@ buildenv() {
|
||||||
# settings file from repository's working tree are used by default
|
# settings file from repository's working tree are used by default
|
||||||
SEARXNG_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml"
|
SEARXNG_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml"
|
||||||
|
|
||||||
if [ -r '/etc/searx/settings.yml' ]; then
|
if [ -r '/etc/searxng/settings.yml' ]; then
|
||||||
if ask_yn "should settings read from: /etc/searx/settings.yml"; then
|
if ask_yn "should settings read from: /etc/searxng/settings.yml"; then
|
||||||
SEARXNG_SETTINGS_PATH='/etc/searx/settings.yml'
|
SEARXNG_SETTINGS_PATH='/etc/searxng/settings.yml'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
export SEARXNG_SETTINGS_PATH
|
export SEARXNG_SETTINGS_PATH
|
||||||
|
|
|
@ -36,7 +36,7 @@ server:
|
||||||
bind_address: "127.0.0.1"
|
bind_address: "127.0.0.1"
|
||||||
base_url: false # Possible values: false or "https://example.org/location".
|
base_url: false # Possible values: false or "https://example.org/location".
|
||||||
|
|
||||||
# If your instance owns a /etc/searx/settings.yml file, then set the following
|
# If your instance owns a /etc/searxng/settings.yml file, then set the following
|
||||||
# values there.
|
# values there.
|
||||||
|
|
||||||
secret_key: "ultrasecretkey" # change this!
|
secret_key: "ultrasecretkey" # change this!
|
||||||
|
|
|
@ -11,7 +11,7 @@ repo_root = realpath(dirname(realpath(__file__)) + sep + '..')
|
||||||
sys.path.insert(0, repo_root)
|
sys.path.insert(0, repo_root)
|
||||||
|
|
||||||
# Assure that the settings file from reposetorie's working tree is used to
|
# Assure that the settings file from reposetorie's working tree is used to
|
||||||
# generate the build_env, not from /etc/searx/settings.yml.
|
# generate the build_env, not from /etc/searxng/settings.yml.
|
||||||
os.environ['SEARXNG_SETTINGS_PATH'] = join(repo_root, 'etc', 'settings.yml')
|
os.environ['SEARXNG_SETTINGS_PATH'] = join(repo_root, 'etc', 'settings.yml')
|
||||||
|
|
||||||
def _env(*arg, **kwargs):
|
def _env(*arg, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue