chore: improves the README.md file from docker by adding more information

This commit is contained in:
Junior L. Botelho (JLB) 2023-02-12 17:06:00 -03:00
parent 377f9d00e3
commit 0be3398071
No known key found for this signature in database
GPG Key ID: 6A25840754F2A524
2 changed files with 67 additions and 13 deletions

View File

@ -10,6 +10,7 @@ LABEL name="LibreX" \
description="Framework and javascript free privacy respecting meta search engine" \
version="1.0" \
vendor="Hnhx Femboy<femboy.hu>" \
maintainer="Hnhx Femboy<femboy.hu>, Junior L. Botelho<juniorbotelho.com.br>" \
url="https://github.com/hnhx/librex" \
usage="https://github.com/hnhx/librex/wiki" \
authors="https://github.com/hnhx/librex/contributors"

View File

@ -1,20 +1,20 @@
### [Introduction](https://github.com/juniorbotelho/librex/tree/docker/docker#introduction)
### Introduction
- [Running a docker container](https://github.com/juniorbotelho/librex/tree/docker/docker#running-a-docker-container)
- [Run a docker container from Docker Hub with `librex/librex:latest`](https://github.com/juniorbotelho/librex/tree/docker/docker#running-a-docker-container-from-docker-hub-with-)
- Run a docker container using the `docker-compose.yml` file
- Environments can be configured in docker container
- Docker version issues
- Building a docker image
- Support differents architectures
- [Running a Docker container](https://github.com/juniorbotelho/librex/tree/docker/docker#running-a-docker-container)
- [Running a Docker container through the Docker hub](https://github.com/juniorbotelho/librex/tree/docker/docker#running-a-docker-container-through-the-docker-hub)
- [Running a Docker container with composer](https://github.com/juniorbotelho/librex/tree/docker/docker#running-a-docker-container-with-composer)
- [Environment variables that can be set in the Docker container](https://github.com/juniorbotelho/librex/tree/docker/docker#environment-variables-that-can-be-set-in-the-docker-container)
- [Docker version issues](https://github.com/juniorbotelho/librex/tree/docker/docker#docker-version-issues)
- [Building a docker image](https://github.com/juniorbotelho/librex/tree/docker/docker#building-a-docker-image)
- [Support for different architectures](https://github.com/juniorbotelho/librex/tree/docker/docker#support-for-different-architectures)
### Running a docker container
Dockerized Librex is a way to provide users with yet another way to self-host their own projects with a view to privacy. If you wish to help, please start by looking for bugs in used docker configurations.
### Run a docker container from Docker Hub with `librex/librex:latest`
### Running a Docker container through the Docker hub
To run librex in a docker container, you can simply use the command:
@ -27,7 +27,7 @@ docker run -d --name librex \
librex/librex:latest
```
or with **`docker-compose.yml`**:
### Running a Docker container with composer
```yml
version: "2.1"
@ -52,7 +52,60 @@ services:
```
### Docker Version
### Environment variables that can be set in the Docker container
This docker image was developed with high configurability in mind, so here is the list of environment variables that can be changed according to your use case, no matter how specific.
| Variables | Default | Examples | Description |
|:----------|:-------------|:---------|:------|
| OPEN_SEARCH_TITLE | "LibreX" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) |
| OPEN_SEARCH_DESCRIPTION | "Framework and javascript free privacy respecting meta search engine" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) |
| OPEN_SEARCH_ENCODING | "UTF-8" | "UTF-8" | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) |
| OPEN_SEARCH_LONG_NAME | "Librex Search" | string | [OpenSearch XML](https://developer.mozilla.org/en-US/docs/Web/OpenSearch) |
| OPEN_SEARCH_HOST | "http://localhost:8080" | string | Host used to identify Librex on the network |
| Variables | Default | Examples | Description |
|:----------|:-------------|:---------|:------|
| CONFIG_GOOGLE_DOMAIN | "com" | "com", "com.br", "com.es" | Defines which Google domain the search will be done, change according to your country |
| CONFIG_GOOGLE_LANGUAGUE | "en" | "pt", "es", "ru" | Defines the language in which searches will be done, see the list of supported languages [here](https://developers.google.com/custom-search/docs/ref_languages). |
| CONFIG_INVIDIOUS_INSTANCE | "https://invidious.namazso.eu" | string | Defines the host that will be used to do video searches using invidious |
| CONFIG_HIDDEN_SERVICE_SEARCH | false | boolean | Defines whether safesearch will be enabled or disabled |
| CONFIG_DISABLE_BITTORRENT_SEARCH | false | boolean | Defines whether bittorrent support will be enabled or disabled |
| CONFIG_BITTORRENT_TRACKERS | "http://nyaa.tracker.wf:7777/announce" | string | Bittorrent trackers, see the complete example in the `config.php` file. |
| Variables | Default | Examples | Description |
|:----------|:-------------|:---------|:------|
| APP_INVIDIOUS | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_BIBLIOGRAM | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_RIMGO | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_SCRIBE | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_LIBRARIAN | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_GOTHUB | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_NITTER | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_LIBREREDDIT | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_PROXITOK | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_WIKILESS | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_QUETRE | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_LIBREMDB | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_BREEZEWIKI | "" | string | Integration with external self-hosted apps, configure the desired host. |
| APP_ANONYMOUS_OVERFLOW | "" | string | Integration with external self-hosted apps, configure the desired host. |
| Variables | Default | Examples | Description |
|:----------|:-------------|:---------|:------|
| CURLOPT_PROXY_ENABLED | false | boolean | If you want to use a proxy, you need to set this variable to true. |
| CURLOPT_PROXY | "" | "127.0.0.1:8080" | Set the proxy using the ip and port to be used |
| CURLOPT_RETURNTRANSFER | true | boolean | **TODO** |
| CURLOPT_ENCODING | "" | string | Defines the encode that curl should use to display the texts correctly |
| CURLOPT_USERAGENT | "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36" | string | This variable defines the 'User-Agent' that curl will use to attempt to avoid being blocked |
| CURLOPT_CUSTOMREQUEST | "GET" | "HEAD", "OPTIONS" | Defines the HTTP method that curl will use to make the request |
| CURLOPT_MAXREDIRS | 5 | number | **TODO** |
| CURLOPT_TIMEOUT | 18 | number | Sets the maximum time curl will wait for a response before timing out |
| CURLOPT_VERBOSE | false | boolean | Specifies whether curl should display detailed information on stdout about the request and response when making requests. Setting to 'true' enables verbose mode |
### Docker version issues
If you are going to build your own docker image based on this repository, pay attention to your Docker version, because depending on how recent the installed version is, maybe you should use the `buildx` command instead of `build`.
@ -61,7 +114,7 @@ Docker <= 20.10: `docker build`
Docker > 20.10: `docker buildx build`
### Build
### Building a docker image
If you don't want to use the image that is already available on `docker hub`, then you can simply build the Dockerfile directly from the github repository using the command:
@ -86,7 +139,7 @@ docker build -t librex:latest .
```
### Supported Architectures
### Support for different architectures
Supported architectures for the official Librex images include the same ones supported by Alpine itself, which are typically denoted as `linux/386`, `linux/amd64`, `linux/arm/v6`. If you need support for a different architecture, such as `linux/arm/v7`, you can modify the 'Dockerfile' to use a more comprehensive base image like `ubuntu:latest` instead.