summaryrefslogtreecommitdiff
path: root/utils/templates
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-03-12 18:41:18 +0100
committerGitHub <noreply@github.com>2022-03-12 18:41:18 +0100
commite847313007aa3a61c26acda122bb183df1df76a7 (patch)
tree035694582c98a40556b9f5d51983312065dd59f8 /utils/templates
parent6c7dca52e79a7a9a70049cb128576191859147de (diff)
parent7308a6e33c0aaad67ff214be5eb984e6900866f2 (diff)
Merge pull request #949 from return42/fix-inst-scripts
Fix and improve installtion scripts in /utils
Diffstat (limited to 'utils/templates')
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini16
-rw-r--r--utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket17
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini16
-rw-r--r--utils/templates/etc/uwsgi/apps-available/searxng.ini:socket17
4 files changed, 52 insertions, 14 deletions
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
index ceaec19c2..aaf55a807 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini
@@ -1,3 +1,4 @@
+# -*- mode: conf; coding: utf-8 -*-
[uwsgi]
# uWSGI core
@@ -79,10 +80,17 @@ http = ${SEARX_INTERNAL_HTTP}
#
# On some distributions you need to create the app folder for the sockets::
#
-# mkdir -p /run/uwsgi/app/searx
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
+# mkdir -p ${SEARX_UWSGI_SOCKET}
+# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
#
-# socket = /run/uwsgi/app/searx/socket
+# socket = ${SEARX_UWSGI_SOCKET}
+
+# uwsgi serves the static files
+# 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
# Cache
-cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
+cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
diff --git a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
index fec553165..e8facda86 100644
--- a/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket
@@ -1,3 +1,4 @@
+# -*- mode: conf; coding: utf-8 -*-
[uwsgi]
# uWSGI core
@@ -79,7 +80,17 @@ pythonpath = ${SEARX_SRC}
#
# On some distributions you need to create the app folder for the sockets::
#
-# mkdir -p /run/uwsgi/app/searx
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
+# mkdir -p ${SEARX_UWSGI_SOCKET}
+# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
#
-socket = /run/uwsgi/app/searx/socket \ No newline at end of file
+socket = ${SEARX_UWSGI_SOCKET}
+
+# uwsgi serves the static files
+# 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
+
+# Cache
+cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini b/utils/templates/etc/uwsgi/apps-available/searxng.ini
index db11df54f..9dad84c16 100644
--- a/utils/templates/etc/uwsgi/apps-available/searxng.ini
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini
@@ -1,3 +1,4 @@
+# -*- mode: conf; coding: utf-8 -*-
[uwsgi]
# uWSGI core
@@ -78,10 +79,17 @@ http = ${SEARX_INTERNAL_HTTP}
#
# On some distributions you need to create the app folder for the sockets::
#
-# mkdir -p /run/uwsgi/app/searx
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
+# mkdir -p /run/uwsgi/app/searxng
+# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
#
-# socket = /run/uwsgi/app/searx/socket
+# socket = ${SEARX_UWSGI_SOCKET}
+
+# uwsgi serves the static files
+# 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
# Cache
-cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
+cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
diff --git a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
index a9598b52b..c76d084e1 100644
--- a/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
+++ b/utils/templates/etc/uwsgi/apps-available/searxng.ini:socket
@@ -1,3 +1,4 @@
+# -*- mode: conf; coding: utf-8 -*-
[uwsgi]
# uWSGI core
@@ -78,7 +79,17 @@ pythonpath = ${SEARX_SRC}
#
# On some distributions you need to create the app folder for the sockets::
#
-# mkdir -p /run/uwsgi/app/searx
-# chown -R ${SERVICE_USER}:${SERVICE_GROUP} /run/uwsgi/app/searx
+# mkdir -p ${SEARX_UWSGI_SOCKET}
+# chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
#
-socket = /run/uwsgi/app/searx/socket \ No newline at end of file
+socket = ${SEARX_UWSGI_SOCKET}
+
+# uwsgi serves the static files
+# 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
+
+# Cache
+cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1