README.md 2.59 KB
Newer Older
Nicolas Gelot's avatar
Nicolas Gelot committed
1 2 3 4 5 6 7 8 9 10 11
# spot for [/e/](https://e.foundation)

![logo](searx/static/themes/eelo/img/favicon.png)

A privacy-respecting, hackable [metasearch engine](https://en.wikipedia.org/wiki/Metasearch_engine).

Spot was forked from searx: read [documentation](https://asciimoo.github.io/searx) and the [wiki](https://github.com/asciimoo/searx/wiki) for more information.

## Changes between Spot and Searx

* eelo theme
12
* redis cache on http requests (TTL 1 day)
Nicolas Gelot's avatar
Nicolas Gelot committed
13 14
* docker packaging thinking to be production ready

15 16
## Architecture

17
7 services are used for production:
Nicolas Gelot's avatar
Nicolas Gelot committed
18 19 20 21 22 23

* [traefik](https://docs.traefik.io/) as edge router to publish services.
* [filtron](https://github.com/asciimoo/filtron) as reverse HTTP proxy to filter requests by different rules.
* [morty](https://github.com/asciimoo/morty) as proxy to serve thumbnails.
* [nginx](https://www.nginx.com/) as http server to serve static files.
* Spot the meta search engine.
24
* [tor](https://www.torproject.org) as open network that helps you defend against traffic analysis.
25
* [redis](https://redis.io/) as memory storage to cache http requests
Nicolas Gelot's avatar
Nicolas Gelot committed
26 27


28 29 30 31 32 33 34 35
```mermaid
graph TD
  A(traefik) --> |https://spot.ecloud.global| B(filtron)
  A(traefik) --> |https://proxy.spot.ecloud.global| C(morty)
  C --> |image link| C
  B --> D(nginx)
  D --> |static file| D
  D --> |API| E(spot)
36 37 38
  E --> H(tor1)
  E --> I(tor2)
  E --> J(torN)
39
  E --> |cache| K(redis)
40 41
```

Nicolas Gelot's avatar
Nicolas Gelot committed
42 43 44 45 46 47 48 49 50 51
## Getting Started

You can run spot with docker-compose. First of all you have to install
docker and docker-compose on your host, then follow instructions
below to run spot for production or local environment.

### Like production

* Run the docker-compose up command to start the project 
```
Nicolas Gelot's avatar
Nicolas Gelot committed
52 53
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build morty
SPOT_MORTY_URL=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-spot_morty_1)
54
COMPOSE_FILE=docker-compose.yml:docker-compose-build.yml docker-compose up --build spot nginx filtron tor
Nicolas Gelot's avatar
Nicolas Gelot committed
55 56
```

Nicolas Gelot's avatar
Nicolas Gelot committed
57
* Getting the ip of the filtron service and go to `http://<ip>`, below the docker way to get the IP of the filtron container
Nicolas Gelot's avatar
Nicolas Gelot committed
58
```
59
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' my-spot_filtron_1
Nicolas Gelot's avatar
Nicolas Gelot committed
60 61 62 63 64 65 66 67
```

### For developer

You can directly run spot, with a python command inside a docker container which
contains all dependencies.

```
68 69 70
docker-compose up -d redis
docker run -it --rm -v $(pwd):/ws -w /ws --network=my-spot_default registry.gitlab.e.foundation:5000/e/cloud/my-spot/env sh
PYTHONPATH=$(pwd) SEARX_REDIS_HOST=redis SEARX_DEBUG=1 python -X dev searx/webapp.py
Nicolas Gelot's avatar
Nicolas Gelot committed
71 72
```

Nicolas Gelot's avatar
Nicolas Gelot committed
73
Then, open your browser and navigate to the container IP.