2019-06-29 09:59:13 +00:00
|
|
|
[uwsgi]
|
|
|
|
# Who will run the code
|
2021-10-02 14:10:13 +00:00
|
|
|
uid = searxng
|
|
|
|
gid = searxng
|
2019-06-29 09:59:13 +00:00
|
|
|
|
|
|
|
# Number of workers (usually CPU count)
|
|
|
|
workers = 4
|
|
|
|
|
|
|
|
# The right granted on the created socket
|
|
|
|
chmod-socket = 666
|
|
|
|
|
|
|
|
# Plugin to use and interpretor config
|
|
|
|
single-interpreter = true
|
|
|
|
master = true
|
|
|
|
plugin = python3
|
|
|
|
lazy-apps = true
|
|
|
|
enable-threads = true
|
|
|
|
|
|
|
|
# Module to import
|
|
|
|
module = searx.webapp
|
|
|
|
|
|
|
|
# Virtualenv and python path
|
2021-10-02 14:10:13 +00:00
|
|
|
pythonpath = /usr/local/searxng/
|
|
|
|
chdir = /usr/local/searxng/searx/
|
2019-06-29 09:59:13 +00:00
|
|
|
|
|
|
|
# Disable logging for privacy
|
|
|
|
disable-logging=True
|
|
|
|
|
|
|
|
# But keep errors for 2 days
|
|
|
|
touch-logrotate = /run/uwsgi-logrotate
|
|
|
|
unique-cron = 15 0 -1 -1 -1 { touch /run/uwsgi-logrotate }
|
|
|
|
log-backupname = /var/log/uwsgi/uwsgi.log.1
|
|
|
|
logto = /var/log/uwsgi/uwsgi.log
|
2020-02-07 18:16:15 +00:00
|
|
|
|
|
|
|
# No keep alive
|
|
|
|
# See https://github.com/searx/searx-docker/issues/24
|
|
|
|
add-header = Connection: close
|
2020-02-25 16:25:11 +00:00
|
|
|
|
|
|
|
# uwsgi serves the static files
|
|
|
|
# expires set to one day as Flask does
|
2021-10-02 14:10:13 +00:00
|
|
|
static-map = /static=/usr/local/searxng/searx/static
|
2020-02-25 16:25:11 +00:00
|
|
|
static-expires = /* 864000
|
|
|
|
static-gzip-all = True
|
|
|
|
offload-threads = %k
|
2021-01-05 10:22:48 +00:00
|
|
|
|
|
|
|
# Cache
|
2021-10-02 14:10:13 +00:00
|
|
|
cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1
|