searxng.ini 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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
  8. uid = ${SERVICE_USER}
  9. gid = ${SERVICE_GROUP}
  10. # set (python) default encoding UTF-8
  11. env = LANG=C.UTF-8
  12. env = LANGUAGE=C.UTF-8
  13. env = LC_ALL=C.UTF-8
  14. # chdir to specified directory before apps loading
  15. chdir = ${SEARX_SRC}/searx
  16. # SearXNG configuration (settings.yml)
  17. env = SEARXNG_SETTINGS_PATH=${SEARXNG_SETTINGS_PATH}
  18. # disable logging for privacy
  19. logger = systemd
  20. disable-logging = true
  21. # The right granted on the created socket
  22. chmod-socket = 666
  23. # Plugin to use and interpretor config
  24. single-interpreter = true
  25. # enable master process
  26. master = true
  27. # load apps in each worker instead of the master
  28. lazy-apps = true
  29. # load uWSGI plugins
  30. plugin = python
  31. # By default the Python plugin does not initialize the GIL. This means your
  32. # app-generated threads will not run. If you need threads, remember to enable
  33. # them with enable-threads. Running uWSGI in multithreading mode (with the
  34. # threads options) will automatically enable threading support. This *strange*
  35. # default behaviour is for performance reasons.
  36. enable-threads = true
  37. # plugin: python
  38. # --------------
  39. #
  40. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-python
  41. # load a WSGI module
  42. module = searx.webapp
  43. # set PYTHONHOME/virtualenv
  44. virtualenv = ${SEARX_PYENV}
  45. # add directory (or glob) to pythonpath
  46. pythonpath = ${SEARX_SRC}
  47. # speak to upstream
  48. # -----------------
  49. #
  50. # Activate the 'http' configuration for filtron or activate the 'socket'
  51. # configuration if you setup your HTTP server to use uWSGI protocol via sockets.
  52. # using IP:
  53. #
  54. # https://uwsgi-docs.readthedocs.io/en/latest/Options.html#plugin-http
  55. # Native HTTP support: https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html
  56. http = ${SEARX_INTERNAL_HTTP}
  57. # using unix-sockets:
  58. #
  59. # On some distributions you need to create the app folder for the sockets::
  60. #
  61. # mkdir -p ${SEARX_UWSGI_SOCKET}
  62. # chown -R ${SERVICE_USER}:${SERVICE_GROUP} ${SEARX_UWSGI_SOCKET}
  63. #
  64. # socket = ${SEARX_UWSGI_SOCKET}
  65. # Cache
  66. cache2 = name=searxcache,items=2000,blocks=2000,blocksize=4096,bitmap=1