summaryrefslogtreecommitdiff
path: root/utils/templates/etc/uwsgi
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-07-30 13:45:12 +0200
committerGitHub <noreply@github.com>2022-07-30 13:45:12 +0200
commit645c2a2ca1cf40ab9429366ac70c69d1ac8fd004 (patch)
tree943270e4998815d360713e21615082293300c877 /utils/templates/etc/uwsgi
parent0cf5310933ee4f6bff4a941f7296686bd671671f (diff)
parente5323b8aa285d61bf011bbe7ca8f02818f19ed79 (diff)
Merge pull request #1332 from return42/searxng-install
Upgrade installation scripts and documentation
Diffstat (limited to 'utils/templates/etc/uwsgi')
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini26
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket29
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini32
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini:socket35
4 files changed, 42 insertions, 80 deletions
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
index aaf55a807..04c32c662 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
@@ -16,7 +16,7 @@ env = LANGUAGE=C.UTF-8
env = LC_ALL=C.UTF-8
# chdir to specified directory before apps loading
-chdir = ${SEARX_SRC}/searx
+chdir = ${SEARXNG_SRC}/searx
# SearXNG configuration (settings.yml)
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
@@ -57,37 +57,27 @@ enable-threads = true
module = searx.webapp
# set PYTHONHOME/virtualenv
-virtualenv = ${SEARX_PYENV}
+virtualenv = ${SEARXNG_PYENV}
# add directory (or glob) to pythonpath
-pythonpath = ${SEARX_SRC}
+pythonpath = ${SEARXNG_SRC}
# speak to upstream
# -----------------
-#
-# Activate the 'http' configuration for filtron or activate the 'socket'
-# configuration if you setup your HTTP server to use uWSGI protocol via sockets.
-# using IP:
-#
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
-http = ${SEARX_INTERNAL_HTTP}
+http = ${SEARXNG_INTERNAL_HTTP}
-# using unix-sockets:
+# uWSGI serves the static files and in settings.yml we use::
#
-# On some distributions you need to create the app folder for the sockets::
+# ui:
+# static_use_hash: true
#
-# mkdir -p ${SEARX_UWSGI_SOCKET}
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
-#
-# socket = ${SEARX_UWSGI_SOCKET}
-
-# uwsgi serves the static files
+static-map = /static=${SEARXNG_STATIC}
# expires set to one year since there are hashes
-static-map = /static=${SEARX_SRC}/searx/static
static-expires = /* 31557600
static-gzip-all = True
offload-threads = %k
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
index e8facda86..bbfaf63be 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
@@ -16,7 +16,7 @@ env = LANGUAGE=C.UTF-8
env = LC_ALL=C.UTF-8
# chdir to specified directory before apps loading
-chdir = ${SEARX_SRC}/searx
+chdir = ${SEARXNG_SRC}/searx
# SearXNG configuration (settings.yml)
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
@@ -57,37 +57,24 @@ enable-threads = true
module = searx.webapp
# set PYTHONHOME/virtualenv
-virtualenv = ${SEARX_PYENV}
+virtualenv = ${SEARXNG_PYENV}
# add directory (or glob) to pythonpath
-pythonpath = ${SEARX_SRC}
+pythonpath = ${SEARXNG_SRC}
# speak to upstream
# -----------------
-#
-# Activate the 'http' configuration for filtron or activate the 'socket'
-# configuration if you setup your HTTP server to use uWSGI protocol via sockets.
-
-# using IP:
-#
-# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
-# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
-# http = ${SEARX_INTERNAL_HTTP}
+socket = ${SEARXNG_UWSGI_SOCKET}
-# using unix-sockets:
+# uWSGI serves the static files and in settings.yml we use::
#
-# On some distributions you need to create the app folder for the sockets::
+# ui:
+# static_use_hash: true
#
-# mkdir -p ${SEARX_UWSGI_SOCKET}
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
-#
-socket = ${SEARX_UWSGI_SOCKET}
-
-# uwsgi serves the static files
+static-map = /static=${SEARXNG_STATIC}
# expires set to one year since there are hashes
-static-map = /static=${SEARX_SRC}/searx/static
static-expires = /* 31557600
static-gzip-all = True
offload-threads = %k
diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini b/utils/templates/etc/uwsgi/apps-available/searxng.ini
index 9dad84c16..5ea7d991a 100644
--- a/utils/templates/etc/uwsgi/apps-available/searxng.ini
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini
@@ -6,7 +6,11 @@
#
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
-# Who will run the code
+# Who will run the code / Hint: in emperor-tyrant mode uid & gid setting will be
+# ignored [1]. Mode emperor-tyrant is the default on fedora (/etc/uwsgi.ini).
+#
+# [1] https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting
+#
uid = ${SERVICE_USER}
gid = ${SERVICE_GROUP}
@@ -16,7 +20,7 @@ env = LANGUAGE=C.UTF-8
env = LC_ALL=C.UTF-8
# chdir to specified directory before apps loading
-chdir = ${SEARX_SRC}/searx
+chdir = ${SEARXNG_SRC}/searx
# SearXNG configuration (settings.yml)
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
@@ -56,37 +60,27 @@ enable-threads = true
module = searx.webapp
# set PYTHONHOME/virtualenv
-virtualenv = ${SEARX_PYENV}
+virtualenv = ${SEARXNG_PYENV}
# add directory (or glob) to pythonpath
-pythonpath = ${SEARX_SRC}
+pythonpath = ${SEARXNG_SRC}
# speak to upstream
# -----------------
-#
-# Activate the 'http' configuration for filtron or activate the 'socket'
-# configuration if you setup your HTTP server to use uWSGI protocol via sockets.
-# using IP:
-#
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
-http = ${SEARX_INTERNAL_HTTP}
+http = ${SEARXNG_INTERNAL_HTTP}
-# using unix-sockets:
-#
-# On some distributions you need to create the app folder for the sockets::
+# uWSGI serves the static files and in settings.yml we use::
#
-# mkdir -p /run/uwsgi/app/searxng
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
+# ui:
+# static_use_hash: true
#
-# socket = ${SEARX_UWSGI_SOCKET}
-
-# uwsgi serves the static files
+static-map = /static=${SEARXNG_STATIC}
# expires set to one year since there are hashes
-static-map = /static=${SEARX_SRC}/searx/static
static-expires = /* 31557600
static-gzip-all = True
offload-threads = %k
diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
index c76d084e1..304ea3500 100644
--- a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
@@ -6,7 +6,11 @@
#
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
-# Who will run the code
+# Who will run the code / Hint: in emperor-tyrant mode uid & gid setting will be
+# ignored [1]. Mode emperor-tyrant is the default on fedora (/etc/uwsgi.ini).
+#
+# [1] https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting
+#
uid = ${SERVICE_USER}
gid = ${SERVICE_GROUP}
@@ -16,7 +20,7 @@ env = LANGUAGE=C.UTF-8
env = LC_ALL=C.UTF-8
# chdir to specified directory before apps loading
-chdir = ${SEARX_SRC}/searx
+chdir = ${SEARXNG_SRC}/searx
# SearXNG configuration (settings.yml)
env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
@@ -56,37 +60,24 @@ enable-threads = true
module = searx.webapp
# set PYTHONHOME/virtualenv
-virtualenv = ${SEARX_PYENV}
+virtualenv = ${SEARXNG_PYENV}
# add directory (or glob) to pythonpath
-pythonpath = ${SEARX_SRC}
+pythonpath = ${SEARXNG_SRC}
# speak to upstream
# -----------------
-#
-# Activate the 'http' configuration for filtron or activate the 'socket'
-# configuration if you setup your HTTP server to use uWSGI protocol via sockets.
-# using IP:
-#
-# https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
-# Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
+socket = ${SEARXNG_UWSGI_SOCKET}
-# http = ${SEARX_INTERNAL_HTTP}
-
-# using unix-sockets:
-#
-# On some distributions you need to create the app folder for the sockets::
+# uWSGI serves the static files and in settings.yml we use::
#
-# mkdir -p ${SEARX_UWSGI_SOCKET}
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
+# ui:
+# static_use_hash: true
#
-socket = ${SEARX_UWSGI_SOCKET}
-
-# uwsgi serves the static files
+static-map = /static=${SEARXNG_STATIC}
# expires set to one year since there are hashes
-static-map = /static=${SEARX_SRC}/searx/static
static-expires = /* 31557600
static-gzip-all = True
offload-threads = %k