From caf47856638303ae62911aa897f3c760ec2bc768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imm=C3=A1nuel!?= <21174107+immanuelfodor@users.noreply.github.com> Date: Wed, 11 Jan 2023 14:53:36 +0100 Subject: [PATCH] Let uWSGI workers and threads be adjustable from env --- dockerfiles/docker-entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dockerfiles/docker-entrypoint.sh b/dockerfiles/docker-entrypoint.sh index efd54016e..332d5c2bb 100755 --- a/dockerfiles/docker-entrypoint.sh +++ b/dockerfiles/docker-entrypoint.sh @@ -61,6 +61,12 @@ echo "SearXNG version ${SEARXNG_VERSION}" # helpers to update the configuration files patch_uwsgi_settings() { CONF="$1" + + # update uwsg.ini + sed -i \ + -e "s|workers = .*|workers = ${UWSGI_WORKERS:-%k}|g" \ + -e "s|threads = .*|threads = ${UWSGI_THREADS:-4}|g" \ + "${CONF}" } patch_searxng_settings() {