feat(searxng-container): bind mount & add limiter
This commit is contained in:
parent
baef45b456
commit
7eace1e6bd
|
@ -1,10 +1,10 @@
|
||||||
services:
|
services:
|
||||||
searxng:
|
searxng:
|
||||||
build:
|
image: docker.io/searxng/searxng:latest
|
||||||
context: .
|
|
||||||
dockerfile: searxng.dockerfile
|
|
||||||
ports:
|
ports:
|
||||||
- 4000:8080
|
- 4000:8080
|
||||||
|
volumes:
|
||||||
|
- ./searxng:/etc/searxng:rw
|
||||||
networks:
|
networks:
|
||||||
- perplexica-network
|
- perplexica-network
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
FROM searxng/searxng
|
|
||||||
|
|
||||||
COPY searxng-settings.yml /etc/searxng/settings.yml
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[botdetection.ip_limit]
|
||||||
|
# activate link_token method in the ip_limit method
|
||||||
|
link_token = true
|
|
@ -0,0 +1,50 @@
|
||||||
|
[uwsgi]
|
||||||
|
# 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 = %k
|
||||||
|
|
||||||
|
# Number of threads per worker
|
||||||
|
# default value: 4 (see Dockerfile)
|
||||||
|
threads = 4
|
||||||
|
|
||||||
|
# The right granted on the created socket
|
||||||
|
chmod-socket = 666
|
||||||
|
|
||||||
|
# Plugin to use and interpreter config
|
||||||
|
single-interpreter = true
|
||||||
|
master = true
|
||||||
|
plugin = python3
|
||||||
|
lazy-apps = true
|
||||||
|
enable-threads = 4
|
||||||
|
|
||||||
|
# Module to import
|
||||||
|
module = searx.webapp
|
||||||
|
|
||||||
|
# Virtualenv and python path
|
||||||
|
pythonpath = /usr/local/searxng/
|
||||||
|
chdir = /usr/local/searxng/searx/
|
||||||
|
|
||||||
|
# automatically set processes name to something meaningful
|
||||||
|
auto-procname = true
|
||||||
|
|
||||||
|
# Disable request logging for privacy
|
||||||
|
disable-logging = true
|
||||||
|
log-5xx = true
|
||||||
|
|
||||||
|
# Set the max size of a request (request-body excluded)
|
||||||
|
buffer-size = 8192
|
||||||
|
|
||||||
|
# No keep alive
|
||||||
|
# See https://github.com/searx/searx-docker/issues/24
|
||||||
|
add-header = Connection: close
|
||||||
|
|
||||||
|
# uwsgi serves the static files
|
||||||
|
static-map = /static=/usr/local/searxng/searx/static
|
||||||
|
# expires set to one day
|
||||||
|
static-expires = /* 86400
|
||||||
|
static-gzip-all = True
|
||||||
|
offload-threads = 4
|
Loading…
Reference in New Issue