installation-docker.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Docker installation &#8212; Searx Documentation (Searx-1.1.0.tex)</title>
  8. <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
  9. <link rel="stylesheet" type="text/css" href="../_static/searx.css" />
  10. <link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
  11. <script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
  12. <script src="../_static/jquery.js"></script>
  13. <script src="../_static/underscore.js"></script>
  14. <script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
  15. <script src="../_static/doctools.js"></script>
  16. <script src="../_static/sphinx_highlight.js"></script>
  17. <link rel="index" title="Index" href="../genindex.html" />
  18. <link rel="search" title="Search" href="../search.html" />
  19. <link rel="next" title="How to update" href="update-searx.html" />
  20. <link rel="prev" title="Install with apache" href="installation-apache.html" />
  21. </head><body>
  22. <div class="related" role="navigation" aria-label="related navigation">
  23. <h3>Navigation</h3>
  24. <ul>
  25. <li class="right" style="margin-right: 10px">
  26. <a href="../genindex.html" title="General Index"
  27. accesskey="I">index</a></li>
  28. <li class="right" >
  29. <a href="../py-modindex.html" title="Python Module Index"
  30. >modules</a> |</li>
  31. <li class="right" >
  32. <a href="update-searx.html" title="How to update"
  33. accesskey="N">next</a> |</li>
  34. <li class="right" >
  35. <a href="installation-apache.html" title="Install with apache"
  36. accesskey="P">previous</a> |</li>
  37. <li class="nav-item nav-item-0"><a href="../index.html">Searx Documentation (Searx-1.1.0.tex)</a> &#187;</li>
  38. <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Administrator documentation</a> &#187;</li>
  39. <li class="nav-item nav-item-this"><a href="">Docker installation</a></li>
  40. </ul>
  41. </div>
  42. <div class="document">
  43. <div class="documentwrapper">
  44. <div class="bodywrapper">
  45. <div class="body" role="main">
  46. <section id="docker-installation">
  47. <span id="installation-docker"></span><h1>Docker installation<a class="headerlink" href="#docker-installation" title="Permalink to this heading">¶</a></h1>
  48. <nav class="contents local" id="contents">
  49. <p class="topic-title">Contents</p>
  50. <ul class="simple">
  51. <li><p><a class="reference internal" href="#docker-image-searx-searx" id="id1">Docker image searx/searx</a></p>
  52. <ul>
  53. <li><p><a class="reference internal" href="#command-line" id="id2">Command line</a></p></li>
  54. <li><p><a class="reference internal" href="#build-the-image" id="id3">Build the image</a></p></li>
  55. </ul>
  56. </li>
  57. <li><p><a class="reference internal" href="#public-instance" id="id4">Public instance</a></p></li>
  58. </ul>
  59. </nav>
  60. <hr class="docutils" />
  61. <section id="docker-image-searx-searx">
  62. <h2><a class="toc-backref" href="#id1" role="doc-backlink">Docker image searx/searx</a><a class="headerlink" href="#docker-image-searx-searx" title="Permalink to this heading">¶</a></h2>
  63. <p>The docker image is <a class="reference external" href="https://hub.docker.com/r/searx/searx">searx/searx</a> (based on <a class="reference external" href="https://github.com/searx/searx">github.com/searx/searx</a>).</p>
  64. <p>Make sure you have <a class="reference external" href="https://docs.docker.com/get-docker/">installed Docker</a>. For instance, you can deploy a local instance:</p>
  65. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">PORT</span><span class="o">=</span><span class="m">80</span>
  66. docker pull searx/searx
  67. docker run --rm -d -v <span class="si">${</span><span class="nv">PWD</span><span class="si">}</span>/searx:/etc/searx -p <span class="nv">$PORT</span>:8080 -e <span class="nv">BASE_URL</span><span class="o">=</span>http://localhost:<span class="nv">$PORT</span>/ searx/searx
  68. </pre></div>
  69. </div>
  70. <p>Go to <code class="docutils literal notranslate"><span class="pre">http://localhost:$PORT</span></code>.</p>
  71. <p>Inside <code class="docutils literal notranslate"><span class="pre">${PWD}/searx</span></code>, you will find <code class="docutils literal notranslate"><span class="pre">settings.yml</span></code> and <code class="docutils literal notranslate"><span class="pre">uwsgi.ini</span></code>.
  72. You can modify these files according to your needs and restart the Docker image.</p>
  73. <section id="command-line">
  74. <h3><a class="toc-backref" href="#id2" role="doc-backlink">Command line</a><a class="headerlink" href="#command-line" title="Permalink to this heading">¶</a></h3>
  75. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>docker run --rm -it searx/searx -h
  76. </pre></div>
  77. </div>
  78. <div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Command line:
  79. -h Display this help
  80. -d Dry run to update the configuration files.
  81. -f Always update on the configuration files (existing files are renamed with the .old suffix)
  82. Without this option, the new configuration files are copied with the .new suffix
  83. Environment variables:
  84. INSTANCE_NAME settings.yml : general.instance_name
  85. AUTOCOMPLETE settings.yml : search.autocomplete
  86. BASE_URL settings.yml : server.base_url
  87. MORTY_URL settings.yml : result_proxy.url
  88. MORTY_KEY settings.yml : result_proxy.key
  89. BIND_ADDRESS uwsgi bind to the specified TCP socket using HTTP protocol. Default value: &quot;0.0.0.0:8080&quot;
  90. Volume:
  91. /etc/searx the docker entry point copies settings.yml and uwsgi.ini in this directory (see the -f command line option)
  92. </pre></div>
  93. </div>
  94. </section>
  95. <section id="build-the-image">
  96. <h3><a class="toc-backref" href="#id3" role="doc-backlink">Build the image</a><a class="headerlink" href="#build-the-image" title="Permalink to this heading">¶</a></h3>
  97. <p>It’s also possible to build searx from the embedded Dockerfile.</p>
  98. <div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>git clone https://github.com/searx/searx.git
  99. <span class="nb">cd</span> searx
  100. make docker.build
  101. </pre></div>
  102. </div>
  103. </section>
  104. </section>
  105. <section id="public-instance">
  106. <h2><a class="toc-backref" href="#id4" role="doc-backlink">Public instance</a><a class="headerlink" href="#public-instance" title="Permalink to this heading">¶</a></h2>
  107. <p>If you intend to create a public instance using Docker, see <a class="reference external" href="https://github.com/searx/searx-docker">https://github.com/searx/searx-docker</a></p>
  108. </section>
  109. </section>
  110. <div class="clearer"></div>
  111. </div>
  112. </div>
  113. </div>
  114. <span id="sidebar-top"></span>
  115. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  116. <div class="sphinxsidebarwrapper">
  117. <p class="logo"><a href="../index.html">
  118. <img class="logo" src="../_static/searx_logo_small.png" alt="Logo"/>
  119. </a></p>
  120. <h3>Project Links</h3>
  121. <ul>
  122. <li><a href="https://searx.github.io/searx/blog/index.html">Blog</a>
  123. <li><a href="https://github.com/searx/searx">Source</a>
  124. <li><a href="https://github.com/searx/searx/wiki">Wiki</a>
  125. <li><a href="https://twitter.com/Searx_engine">Twitter</a>
  126. <li><a href="https://github.com/searx/searx/issues">Issue Tracker</a>
  127. </ul><h3>Navigation</h3>
  128. <ul>
  129. <li><a href="../index.html">Overview</a>
  130. <ul>
  131. <li><a href="index.html">Administrator documentation</a>
  132. <ul>
  133. <li>Previous: <a href="installation-apache.html" title="previous chapter">Install with apache</a>
  134. <li>Next: <a href="update-searx.html" title="next chapter">How to update</a></ul>
  135. </li>
  136. </ul>
  137. </li>
  138. </ul>
  139. <div id="searchbox" style="display: none" role="search">
  140. <h3 id="searchlabel">Quick search</h3>
  141. <div class="searchformwrapper">
  142. <form class="search" action="../search.html" method="get">
  143. <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
  144. <input type="submit" value="Go" />
  145. </form>
  146. </div>
  147. </div>
  148. <script>document.getElementById('searchbox').style.display = "block"</script>
  149. </div>
  150. </div>
  151. <div class="clearer"></div>
  152. </div>
  153. <div class="footer" role="contentinfo">
  154. &#169; Copyright 2015-2022, Adam Tauber, Noémi Ványi.
  155. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
  156. </div>
  157. <script src="../_static/version_warning_offset.js"></script>
  158. </body>
  159. </html>