diff --git a/docker/README.md b/docker/README.md index 4d944c7..7104f17 100644 --- a/docker/README.md +++ b/docker/README.md @@ -10,6 +10,7 @@ - [Search Config](#search-config) - [Wikipedia](#wikipedia) - [Applications](#applications) + - [Engines](#engines) - [Curl](#curl) - [Docker version issues](#docker-version-issues) - [Building a docker image](#building-a-docker-image) @@ -103,6 +104,13 @@ This docker image was developed with high configurability in mind, so here is th
+### Engines +| Variables | Default | Examples | Description | +|:----------|:-------------|:---------|:------| +| CONFIG_TEXT_SEARCH_ENGINE | "google" | "google", "duckduckgo" | Change your text search engine. | + +
+ ### Applications | Variables | Default | Examples | Description | diff --git a/docker/attributes.sh b/docker/attributes.sh index db47c3d..91829bb 100755 --- a/docker/attributes.sh +++ b/docker/attributes.sh @@ -49,6 +49,8 @@ export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""} export APP_SUDS=${APP_SUDS:-""} export APP_BIBLIOREADS=${APP_BIBLIOREADS:-""} +export CONFIG_TEXT_SEARCH_ENGINE=${CONFIG_TEXT_SEARCH_ENGINE:-"google"} + # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests # Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies export CURLOPT_PROXY_ENABLED=${CURLOPT_PROXY_ENABLED:-false} diff --git a/docker/php/config.php b/docker/php/config.php index 5cee38a..a62af5d 100644 --- a/docker/php/config.php +++ b/docker/php/config.php @@ -100,6 +100,10 @@ ) ), + "preferred_engines" => array( + "text" => "${CONFIG_TEXT_SEARCH_ENGINE}" + ), + "curl_settings" => array( CURLOPT_PROXY => "${CURLOPT_PROXY}", CURLOPT_PROXYTYPE => "${CURLOPT_PROXYTYPE}", diff --git a/docker/php/php.dockerfile b/docker/php/php.dockerfile index ec5dcc1..90fc93b 100644 --- a/docker/php/php.dockerfile +++ b/docker/php/php.dockerfile @@ -37,6 +37,8 @@ ENV APP_ANONYMOUS_OVERFLOW="" ENV APP_SUDS="" ENV APP_BIBLIOREADS="" +# Preferred search engines. +ENV CONFIG_TEXT_SEARCH_ENGINE="google" # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests # Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies