summaryrefslogtreecommitdiff
path: root/dockerfiles
diff options
context:
space:
mode:
authorBnyro <bnyro@tutanota.com>2025-05-05 09:46:37 +0200
committerGitHub <noreply@github.com>2025-05-05 09:46:37 +0200
commit0315988f5ab9d5d55693bc9a0eca045bf9220506 (patch)
tree6025fe6ed18e04a25be23aad24130288df623216 /dockerfiles
parent2e74d863210c0d21b9e0a64576dcd24237f23f8c (diff)
fix] revert searxng/searxng#4699 due to breaking issues (#4720)
This reverts commit 2e74d863210c0d21b9e0a64576dcd24237f23f8c.
Diffstat (limited to 'dockerfiles')
-rwxr-xr-xdockerfiles/docker-entrypoint.sh14
-rw-r--r--dockerfiles/uwsgi.ini5
2 files changed, 16 insertions, 3 deletions
diff --git a/dockerfiles/docker-entrypoint.sh b/dockerfiles/docker-entrypoint.sh
index 3668fb589..771780bb8 100755
--- a/dockerfiles/docker-entrypoint.sh
+++ b/dockerfiles/docker-entrypoint.sh
@@ -43,7 +43,15 @@ do
esac
done
-echo "SearXNG version $SEARXNG_VERSION"
+get_searxng_version(){
+ su searxng -c \
+ 'python3 -c "import six; import searx.version; six.print_(searx.version.VERSION_STRING)"' \
+ 2>/dev/null
+}
+
+SEARXNG_VERSION="$(get_searxng_version)"
+export SEARXNG_VERSION
+echo "SearXNG version ${SEARXNG_VERSION}"
# helpers to update the configuration files
patch_uwsgi_settings() {
@@ -68,7 +76,7 @@ patch_searxng_settings() {
-e "s|base_url: false|base_url: ${BASE_URL}|g" \
-e "s/instance_name: \"SearXNG\"/instance_name: \"${INSTANCE_NAME}\"/g" \
-e "s/autocomplete: \"\"/autocomplete: \"${AUTOCOMPLETE}\"/g" \
- -e "s/ultrasecretkey/$(head -c 24 /dev/urandom | base64 | tr -dc 'a-zA-Z0-9')/g" \
+ -e "s/ultrasecretkey/$(openssl rand -hex 32)/g" \
"${CONF}"
# Morty configuration
@@ -164,4 +172,4 @@ printf 'Listen on %s\n' "${BIND_ADDRESS}"
# Start uwsgi
# TODO: "--http-socket" will be removed in the future (see uwsgi.ini.new config file): https://github.com/searxng/searxng/pull/4578
-exec /usr/local/searxng/venv/bin/uwsgi --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"
+exec uwsgi --http-socket "${BIND_ADDRESS}" "${UWSGI_SETTINGS_PATH}"
diff --git a/dockerfiles/uwsgi.ini b/dockerfiles/uwsgi.ini
index 357d3c40a..dfde9109a 100644
--- a/dockerfiles/uwsgi.ini
+++ b/dockerfiles/uwsgi.ini
@@ -3,6 +3,10 @@
# default value: [::]:8080 (see Dockerfile)
http-socket = $(BIND_ADDRESS)
+# Who will run the code
+uid = searxng
+gid = searxng
+
# Number of workers (usually CPU count)
# default value: %k (= number of CPU core, see Dockerfile)
workers = $(UWSGI_WORKERS)
@@ -17,6 +21,7 @@ chmod-socket = 666
# Plugin to use and interpreter config
single-interpreter = true
master = true
+plugin = python3
lazy-apps = true
enable-threads = true