From 2964a24b3d82651cfd9e30f2ba659bf0f5b2579a Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 29 Jun 2021 19:46:06 +0200 Subject: [fix] utils/build_env.py and add documentation 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 --- searx/settings.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index faadb36d1..8b642d668 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -4,6 +4,8 @@ general: contact_url: false # mailto:contact@example.com brand: + # If you change a value in this section don't forget to rebuild instance's + # enviroment (make buildenv) git_url: https://github.com/searxng/searxng git_branch: master issue_url: https://github.com/searxng/searxng/issues @@ -31,12 +33,14 @@ search: 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/" + + # Set custom base_url. Possible values: false or "https://example.org/location" + # If you change base_url don't forget to rebuild instance's enviroment (make + # buildenv) port & address to listen on base_url: false + + secret_key: "ultrasecretkey" # change this! # Proxying image results through searx image_proxy: false # 1.0 and 1.1 are supported -- cgit v1.2.3 From b6a55e223ce0e287adeeafce8164e411154b5423 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 20 Jul 2021 13:16:21 +0200 Subject: [mod] reduce enviroment variables in shell scripts to what is needed 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 --- searx/settings.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index 8b642d668..a951b862b 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -4,15 +4,16 @@ general: contact_url: false # mailto:contact@example.com brand: - # If you change a value in this section don't forget to rebuild instance's - # enviroment (make buildenv) - git_url: https://github.com/searxng/searxng - git_branch: master - issue_url: https://github.com/searxng/searxng/issues new_issue_url: https://github.com/searxng/searxng/issues/new docs_url: https://searxng.github.io/searxng public_instances: https://searx.space wiki_url: https://github.com/searxng/searxng/wiki + issue_url: https://github.com/searxng/searxng/issues + + # If you change a value below don't forget to rebuild instance's enviroment + # (make buildenv) + git_url: https://github.com/searxng/searxng + git_branch: master search: # Filter results. 0: None, 1: Moderate, 2: Strict @@ -32,13 +33,14 @@ search: formats: [html, csv, json, rss] server: + # If you change port, bind_address or base_url don't forget to rebuild + # instance's enviroment (make buildenv) port: 8888 bind_address: "127.0.0.1" + base_url: false # Possible values: false or "https://example.org/location". - # Set custom base_url. Possible values: false or "https://example.org/location" - # If you change base_url don't forget to rebuild instance's enviroment (make - # buildenv) port & address to listen on - base_url: false + # If your instance owns a /etc/searx/settings.yml file, then set the following + # values there. secret_key: "ultrasecretkey" # change this! # Proxying image results through searx -- cgit v1.2.3 From e946c3462c2b44fb154d0b6595f4f42605a326e5 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 20 Jul 2021 13:50:01 +0200 Subject: [brand] !!DO NOT MERGE!! this patch uses branch fix-searx.sh @return42 Do not merge this patch in master branch of SearXNG! This branch exists only for testing the feature branch fix-searx.sh @return42. This patch changes the buildenv to:: GIT_URL='https://github.com/return42/searxng' GIT_BRANCH='fix-searx.sh' SEARX_PORT='7777' SEARX_BIND_ADDRESS='127.0.0.12' To test installation procedure, clone feature branch (fix-searx.sh):: $ cd ~/Downloads $ git clone --branch fix-searx.sh https://github.com/return42/searxng searxng $ cd searxng $ ./utils/searx.sh install all ... Signed-off-by: Markus Heiser --- searx/settings.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'searx/settings.yml') diff --git a/searx/settings.yml b/searx/settings.yml index a951b862b..5307631dd 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -12,8 +12,8 @@ brand: # If you change a value below don't forget to rebuild instance's enviroment # (make buildenv) - git_url: https://github.com/searxng/searxng - git_branch: master + git_url: https://github.com/return42/searxng + git_branch: fix-searx.sh search: # Filter results. 0: None, 1: Moderate, 2: Strict @@ -35,8 +35,8 @@ search: server: # If you change port, bind_address or base_url don't forget to rebuild # instance's enviroment (make buildenv) - port: 8888 - bind_address: "127.0.0.1" + port: 7777 + bind_address: "127.0.0.12" 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 -- cgit v1.2.3