searxng.ini 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. # Number of workers (usually CPU count)
  41. workers = ${UWSGI_WORKERS:-%k}
  42. threads = ${UWSGI_THREADS:-4}
  43. # plugin: python
  44. # --------------
  45. #
  46. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
  47. # load a WSGI module
  48. module = searx.webapp
  49. # set PYTHONHOME/virtualenv
  50. virtualenv = ${SEARXNG_PYENV}
  51. # add directory (or glob) to pythonpath
  52. pythonpath = ${SEARXNG_SRC}
  53. # speak to upstream
  54. # -----------------
  55. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
  56. # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
  57. http = ${SEARXNG_INTERNAL_HTTP}
  58. buffer-size = 8192
  59. # uWSGI serves the static files and in settings.yml we use::
  60. #
  61. # ui:
  62. # static_use_hash: true
  63. #
  64. static-map = /static=${SEARXNG_STATIC}
  65. static-gzip-all = True
  66. offload-threads = %k