searxng.ini 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # -*- mode: conf; coding: utf-8 -*-
  2. [uwsgi]
  3. # uWSGI core
  4. # ----------
  5. #
  6. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#uwsgi-core
  7. # Who will run the code / Hint: in emperor-tyrant mode uid & gid setting will be
  8. # ignored [1]. Mode emperor-tyrant is the default on fedora (/etc/uwsgi.ini).
  9. #
  10. # [1] https://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting
  11. #
  12. uid = ${SERVICE_USER}
  13. gid = ${SERVICE_GROUP}
  14. # set (python) default encoding UTF-8
  15. env = LANG=C.UTF-8
  16. env = LANGUAGE=C.UTF-8
  17. env = LC_ALL=C.UTF-8
  18. # chdir to specified directory before apps loading
  19. chdir = ${SEARXNG_SRC}/searx
  20. # SearXNG configuration (settings.yml)
  21. env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
  22. # disable logging for privacy
  23. disable-logging = true
  24. # The right granted on the created socket
  25. chmod-socket = 666
  26. # Plugin to use and interpreter config
  27. single-interpreter = true
  28. # enable master process
  29. master = true
  30. # load apps in each worker instead of the master
  31. lazy-apps = true
  32. # load uWSGI plugins
  33. plugin = python3,http
  34. # By default the Python plugin does not initialize the GIL. This means your
  35. # app-generated threads will not run. If you need threads, remember to enable
  36. # them with enable-threads. Running uWSGI in multithreading mode (with the
  37. # threads options) will automatically enable threading support. This *strange*
  38. # default behaviour is for performance reasons.
  39. enable-threads = true
  40. # plugin: python
  41. # --------------
  42. #
  43. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
  44. # load a WSGI module
  45. module = searx.webapp
  46. # set PYTHONHOME/virtualenv
  47. virtualenv = ${SEARXNG_PYENV}
  48. # add directory (or glob) to pythonpath
  49. pythonpath = ${SEARXNG_SRC}
  50. # speak to upstream
  51. # -----------------
  52. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
  53. # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
  54. http = ${SEARXNG_INTERNAL_HTTP}
  55. buffer-size = 8192
  56. # uWSGI serves the static files and in settings.yml we use::
  57. #
  58. # ui:
  59. # static_use_hash: true
  60. #
  61. static-map = /static=${SEARXNG_STATIC}
  62. # expires set to one year since there are hashes
  63. static-expires = /* 31557600
  64. static-gzip-all = True
  65. offload-threads = %k
  66. # Cache
  67. cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1