mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
docs: add utils/lxc.sh docs, normalize filtron, morty & searx docs
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
4e307edb2d
commit
dd53c45a2c
8 changed files with 164 additions and 61 deletions
|
@ -27,8 +27,8 @@ The script adds a ``${SERVICE_USER}`` (default:``filtron``) and installs filtron
|
|||
into this user account:
|
||||
|
||||
#. Create a separated user account (``filtron``).
|
||||
#. Download and install Go_ binary in users $HOME (``~filtron``).
|
||||
#. Install filtron with the package management of Go_ (``go get -v -u
|
||||
#. Download and install Go_ binary in user's $HOME (``~filtron``).
|
||||
#. Install filtron with the package management from Go_ (``go get -v -u
|
||||
github.com/asciimoo/filtron``)
|
||||
#. Setup a proper rule configuration :origin:`[ref]
|
||||
<utils/templates/etc/filtron/rules.json>` (``/etc/filtron/rules.json``).
|
||||
|
@ -36,6 +36,16 @@ into this user account:
|
|||
<utils/templates/lib/systemd/system/filtron.service>`
|
||||
(``/lib/systemd/system/filtron.service``).
|
||||
|
||||
.. _filtron.sh overview:
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The ``--help`` output of the script is largely self-explanatory
|
||||
(:ref:`toolboxing common`):
|
||||
|
||||
.. program-output:: ../utils/filtron.sh --help
|
||||
|
||||
.. _reverse proxy:
|
||||
|
||||
Public Reverse Proxy
|
||||
|
@ -63,14 +73,3 @@ To install searx in your public HTTP server use:
|
|||
$ sudo -H a2enmod headers
|
||||
$ sudo -H a2enmod proxy
|
||||
$ sudo -H a2enmod proxy_http
|
||||
|
||||
.. _filtron.sh overview:
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The ``--help`` output of the script is largely self-explanatory
|
||||
(:ref:`toolboxing common`):
|
||||
|
||||
.. program-output:: ../utils/filtron.sh --help
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ developers.
|
|||
searx.sh
|
||||
filtron.sh
|
||||
morty.sh
|
||||
lxc.sh
|
||||
|
||||
.. _toolboxing common:
|
||||
|
||||
|
|
79
docs/utils/lxc.sh.rst
Normal file
79
docs/utils/lxc.sh.rst
Normal file
|
@ -0,0 +1,79 @@
|
|||
|
||||
|
||||
.. _snap: https://snapcraft.io
|
||||
.. _snapcraft LXD: https://snapcraft.io/lxd
|
||||
.. _LXC/LXD Image Server: https://uk.images.linuxcontainers.org/
|
||||
.. _LXC: https://linuxcontainers.org/lxc/introduction/
|
||||
.. _LXD: https://linuxcontainers.org/lxd/introduction/
|
||||
.. _`LXD@github`: https://github.com/lxc/lxd
|
||||
|
||||
.. _lxc.sh:
|
||||
|
||||
================
|
||||
``utils/lxc.sh``
|
||||
================
|
||||
|
||||
.. sidebar:: further reading
|
||||
|
||||
- snap_, `snapcraft LXD`_
|
||||
- LXC_, LXD_
|
||||
- `LXC/LXD Image Server`_
|
||||
- `LXD@github`_
|
||||
|
||||
With the use of *Linux Containers* (LXC_) we can scale our tasks over a stack of
|
||||
containers, what we call the: *lxc suite*. Before you can start with
|
||||
containers, you need to install and initiate LXD_ once::
|
||||
|
||||
$ snap install lxd
|
||||
$ lxd init --auto
|
||||
|
||||
The *searx suite* (:origin:`lxc-searx.env <utils/lxc-searx.env>`) is loaded by
|
||||
default, every time you start the ``lxc.sh`` script (you do not need to care
|
||||
about). To make use of the containers from the *searx suite*, you have to build
|
||||
the :ref:`LXC suite containers <lxc.sh --help>` first. But be warned, this
|
||||
might take some time::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh build
|
||||
|
||||
A cup of coffee later, your LXC suite is build up and you can run whatever task
|
||||
you want / in a selected or even in all :ref:`LXC suite containers <lxc.sh
|
||||
--help>`. Each container shares the root folder of the repository and the
|
||||
command ``utils/lxc.sh cmd`` handles relative path names *transparent*::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd -- ls -la Makefile
|
||||
...
|
||||
[searx-ubu2004] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile
|
||||
[searx-fedora31] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile
|
||||
[searx-archlinux] -rw-r--r-- 1 root root 7603 Mar 30 11:54 Makefile
|
||||
|
||||
With this in mind, you can run :ref:`searx.sh` and install packages, needed by
|
||||
searx::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd -- ./utils/searx.sh install packages
|
||||
|
||||
And run one of the :origin:`Makefile` targets::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh cmd -- make test.sh
|
||||
|
||||
You can install a *buildhost environment* into the containers (time for another
|
||||
cup of coffee)::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh install buildhost
|
||||
|
||||
If you want to get rid off all the containers, just type::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh remove
|
||||
|
||||
To clean up your local images use::
|
||||
|
||||
$ sudo -H ./utils/lxc.sh remove images
|
||||
|
||||
.. _lxc.sh --help:
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The ``--help`` output of the script is largely self-explanatory:
|
||||
|
||||
.. program-output:: ../utils/lxc.sh --help
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
.. _morty: https://github.com/asciimoo/morty
|
||||
.. _morty's README: https://github.com/asciimoo/morty
|
||||
.. _Go: https://golang.org/
|
||||
|
||||
.. _morty.sh:
|
||||
|
||||
|
@ -22,7 +23,15 @@ running the command:
|
|||
sudo -H ./utils/morty.sh install all
|
||||
|
||||
The script adds a ``${SERVICE_USER}`` (default:``morty``) and installs morty_
|
||||
into this user account.
|
||||
into this user account:
|
||||
|
||||
#. Create a separated user account (``morty``).
|
||||
#. Download and install Go_ binary in user's $HOME (``~morty``).
|
||||
#. Install morty_ with the package management from Go_ (``go get -v -u
|
||||
github.com/asciimoo/morty``)
|
||||
#. Setup a systemd service unit :origin:`[ref]
|
||||
<utils/templates/lib/systemd/system/morty.service>`
|
||||
(``/lib/systemd/system/morty.service``).
|
||||
|
||||
.. hint::
|
||||
|
||||
|
|
|
@ -29,41 +29,6 @@ into this user account. The installation is described in chapter
|
|||
|
||||
.. _intranet reverse proxy:
|
||||
|
||||
Intranet Reverse Proxy
|
||||
======================
|
||||
|
||||
To install searx in your intranet HTTP server use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo -H ./utils/searx.sh apache install
|
||||
|
||||
.. warning::
|
||||
|
||||
This setup is **not** suitable **for public instances**, go on with
|
||||
:ref:`reverse proxy`!
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: apache
|
||||
|
||||
.. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:uwsgi
|
||||
:language: apache
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Ubuntu / debian
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H apt install libapache2-mod-uwsgi
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo pacman -S uwsgi
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
|
@ -71,3 +36,45 @@ The ``--help`` output of the script is largely self-explanatory
|
|||
(:ref:`toolboxing common`):
|
||||
|
||||
.. program-output:: ../utils/searx.sh --help
|
||||
|
||||
|
||||
Intranet Reverse Proxy
|
||||
======================
|
||||
|
||||
.. warning::
|
||||
|
||||
This setup is **not** suitable **for public instances**, go on with
|
||||
:ref:`reverse proxy`!
|
||||
|
||||
To install searx in your intranet HTTP server use:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
sudo -H ./utils/searx.sh apache install
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: apache
|
||||
|
||||
.. literalinclude:: ../../utils/templates/etc/apache2/sites-available/searx.conf:uwsgi
|
||||
:language: apache
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. group-tab:: Ubuntu / debian
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H apt install libapache2-mod-uwsgi
|
||||
|
||||
.. group-tab:: Arch Linux
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H pacman -S uwsgi
|
||||
|
||||
.. group-tab:: Fedora / RHEL
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
$ sudo -H dnf install uwsgi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue