summaryrefslogtreecommitdiff
path: root/utils/templates
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarIT.de>2022-01-11 19:55:14 +0100
committerGitHub <noreply@github.com>2022-01-11 19:55:14 +0100
commit977e9a433085124e17f2f7f26afabbeb71db9470 (patch)
tree286c046cdd9eaa069e49c81b6f7f7bb545746b65 /utils/templates
parentf4004133b605cea8225c720a7f4c593d4c20d13e (diff)
parentdca83944b588be3ec9e49486daea6cf15ef58f78 (diff)
downloadsearxng-977e9a433085124e17f2f7f26afabbeb71db9470.tar.gz
searxng-977e9a433085124e17f2f7f26afabbeb71db9470.zip
Merge pull request #686 from return42/lib_redis
Add redis DB and connector
Diffstat (limited to 'utils/templates')
-rw-r--r--utils/templates/lib/systemd/system/searxng-redis.service42
1 files changed, 42 insertions, 0 deletions
diff --git a/utils/templates/lib/systemd/system/searxng-redis.service b/utils/templates/lib/systemd/system/searxng-redis.service
new file mode 100644
index 000000000..d1d163f04
--- /dev/null
+++ b/utils/templates/lib/systemd/system/searxng-redis.service
@@ -0,0 +1,42 @@
+[Unit]
+
+Description=SearXNG redis service
+After=syslog.target
+After=network.target
+Documentation=https://redis.io/documentation
+
+[Service]
+
+Type=simple
+User=${REDIS_USER}
+Group=${REDIS_USER}
+WorkingDirectory=${REDIS_HOME}
+Restart=always
+TimeoutStopSec=0
+
+Environment=USER=${REDIS_USER} HOME=${REDIS_HOME}
+ExecStart=${REDIS_HOME_BIN}/redis-server ${REDIS_CONF}
+ExecPaths=${REDIS_HOME_BIN}
+
+LimitNOFILE=65535
+NoNewPrivileges=true
+PrivateDevices=yes
+
+# ProtectSystem=full
+ProtectHome=yes
+ReadOnlyDirectories=/
+ReadWritePaths=-${REDIS_HOME}/run
+
+UMask=007
+PrivateTmp=yes
+
+MemoryDenyWriteExecute=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+RestrictRealtime=true
+RestrictNamespaces=true
+
+[Install]
+
+WantedBy=multi-user.target