mirror of https://github.com/searxng/searxng.git
[feat] docker: add env vars for common public instance settings
This commit is contained in:
parent
63b7d558b6
commit
7be468d213
|
@ -173,3 +173,4 @@ features or generally made searx better:
|
||||||
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
|
- Austin Olacsi `<https://github.com/Austin-Olacsi>`
|
||||||
- @micsthepick
|
- @micsthepick
|
||||||
- Daniel Kukula `<https://github.com/dkuku>`
|
- Daniel Kukula `<https://github.com/dkuku>`
|
||||||
|
- Patrick Evans `https://github.com/holysoles`
|
|
@ -31,13 +31,13 @@
|
||||||
``secret_key`` : ``$SEARXNG_SECRET``
|
``secret_key`` : ``$SEARXNG_SECRET``
|
||||||
Used for cryptography purpose.
|
Used for cryptography purpose.
|
||||||
|
|
||||||
``limiter`` :
|
``limiter`` : ``$SEARXNG_LIMITER``
|
||||||
Rate limit the number of request on the instance, block some bots. The
|
Rate limit the number of request on the instance, block some bots. The
|
||||||
:ref:`limiter` requires a :ref:`settings redis` database.
|
:ref:`limiter` requires a :ref:`settings redis` database.
|
||||||
|
|
||||||
.. _public_instance:
|
.. _public_instance:
|
||||||
|
|
||||||
``public_instance`` :
|
``public_instance`` : ``$SEARXNG_PUBLIC_INSTANCE``
|
||||||
|
|
||||||
Setting that allows to enable features specifically for public instances (not
|
Setting that allows to enable features specifically for public instances (not
|
||||||
needed for local usage). By set to ``true`` the following features are
|
needed for local usage). By set to ``true`` the following features are
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
.. _image_proxy:
|
.. _image_proxy:
|
||||||
|
|
||||||
``image_proxy`` :
|
``image_proxy`` : ``$SEARXNG_IMAGE_PROXY``
|
||||||
Allow your instance of SearXNG of being able to proxy images. Uses memory space.
|
Allow your instance of SearXNG of being able to proxy images. Uses memory space.
|
||||||
|
|
||||||
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
|
.. _HTTP headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
.. _static_use_hash:
|
.. _static_use_hash:
|
||||||
|
|
||||||
``static_use_hash`` :
|
``static_use_hash`` : ``$SEARXNG_STATIC_USE_HASH``
|
||||||
Enables `cache busting`_ of static files.
|
Enables `cache busting`_ of static files.
|
||||||
|
|
||||||
``default_locale`` :
|
``default_locale`` :
|
||||||
|
|
|
@ -78,14 +78,18 @@ server:
|
||||||
# public URL of the instance, to ensure correct inbound links. Is overwritten
|
# public URL of the instance, to ensure correct inbound links. Is overwritten
|
||||||
# by ${SEARXNG_URL}.
|
# by ${SEARXNG_URL}.
|
||||||
base_url: false # "http://example.com/location"
|
base_url: false # "http://example.com/location"
|
||||||
limiter: false # rate limit the number of request on the instance, block some bots
|
# rate limit the number of request on the instance, block some bots.
|
||||||
public_instance: false # enable features designed only for public instances
|
# Is overwritten by ${SEARXNG_LIMITER}
|
||||||
|
limiter: false
|
||||||
|
# enable features designed only for public instances.
|
||||||
|
# Is overwritten by ${SEARXNG_PUBLIC_INSTANCE}
|
||||||
|
public_instance: false
|
||||||
|
|
||||||
# If your instance owns a /etc/searxng/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" # Is overwritten by ${SEARXNG_SECRET}
|
secret_key: "ultrasecretkey" # Is overwritten by ${SEARXNG_SECRET}
|
||||||
# Proxying image results through searx
|
# Proxy image results through SearXNG. Is overwritten by ${SEARXNG_IMAGE_PROXY}
|
||||||
image_proxy: false
|
image_proxy: false
|
||||||
# 1.0 and 1.1 are supported
|
# 1.0 and 1.1 are supported
|
||||||
http_protocol_version: "1.0"
|
http_protocol_version: "1.0"
|
||||||
|
@ -106,6 +110,7 @@ redis:
|
||||||
ui:
|
ui:
|
||||||
# Custom static path - leave it blank if you didn't change
|
# Custom static path - leave it blank if you didn't change
|
||||||
static_path: ""
|
static_path: ""
|
||||||
|
# Is overwritten by ${SEARXNG_STATIC_USE_HASH}.
|
||||||
static_use_hash: false
|
static_use_hash: false
|
||||||
# Custom templates path - leave it blank if you didn't change
|
# Custom templates path - leave it blank if you didn't change
|
||||||
templates_path: ""
|
templates_path: ""
|
||||||
|
|
|
@ -174,11 +174,11 @@ SCHEMA = {
|
||||||
'server': {
|
'server': {
|
||||||
'port': SettingsValue((int, str), 8888, 'SEARXNG_PORT'),
|
'port': SettingsValue((int, str), 8888, 'SEARXNG_PORT'),
|
||||||
'bind_address': SettingsValue(str, '127.0.0.1', 'SEARXNG_BIND_ADDRESS'),
|
'bind_address': SettingsValue(str, '127.0.0.1', 'SEARXNG_BIND_ADDRESS'),
|
||||||
'limiter': SettingsValue(bool, False),
|
'limiter': SettingsValue(bool, False, 'SEARXNG_LIMITER'),
|
||||||
'public_instance': SettingsValue(bool, False),
|
'public_instance': SettingsValue(bool, False, 'SEARXNG_PUBLIC_INSTANCE'),
|
||||||
'secret_key': SettingsValue(str, environ_name='SEARXNG_SECRET'),
|
'secret_key': SettingsValue(str, environ_name='SEARXNG_SECRET'),
|
||||||
'base_url': SettingsValue((False, str), False, 'SEARXNG_BASE_URL'),
|
'base_url': SettingsValue((False, str), False, 'SEARXNG_BASE_URL'),
|
||||||
'image_proxy': SettingsValue(bool, False),
|
'image_proxy': SettingsValue(bool, False, 'SEARXNG_IMAGE_PROXY'),
|
||||||
'http_protocol_version': SettingsValue(('1.0', '1.1'), '1.0'),
|
'http_protocol_version': SettingsValue(('1.0', '1.1'), '1.0'),
|
||||||
'method': SettingsValue(('POST', 'GET'), 'POST'),
|
'method': SettingsValue(('POST', 'GET'), 'POST'),
|
||||||
'default_http_headers': SettingsValue(dict, {}),
|
'default_http_headers': SettingsValue(dict, {}),
|
||||||
|
@ -188,7 +188,7 @@ SCHEMA = {
|
||||||
},
|
},
|
||||||
'ui': {
|
'ui': {
|
||||||
'static_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'static')),
|
'static_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'static')),
|
||||||
'static_use_hash': SettingsValue(bool, False),
|
'static_use_hash': SettingsValue(bool, False, 'SEARXNG_STATIC_USE_HASH'),
|
||||||
'templates_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'templates')),
|
'templates_path': SettingsDirectoryValue(str, os.path.join(searx_dir, 'templates')),
|
||||||
'default_theme': SettingsValue(str, 'simple'),
|
'default_theme': SettingsValue(str, 'simple'),
|
||||||
'default_locale': SettingsValue(str, ''),
|
'default_locale': SettingsValue(str, ''),
|
||||||
|
|
Loading…
Reference in New Issue