2023-02-11 08:20:40 -08:00
#!/bin/sh
2023-02-11 10:55:17 -08:00
# YOU DON'T NEED TO EDIT THIS FILE. IF YOU WANT TO SET CUSTOM ENVIRONMENT VARIABLES,
# USE THE 'DOCKERFILE IMAGE' FROM ROOT DIRECTORY AND PASS THE ENVIRONMENT PARAMETERS
2023-02-11 08:20:40 -08:00
2023-02-11 10:55:17 -08:00
# These templates will be used to create configuration files that incorporate values from environment variables
# If these locations do not already exist within the Docker container, they will be created
2023-02-11 18:08:53 -08:00
export CONFIG_PHP_TEMPLATE = " $( pwd ) /config.php "
export CONFIG_OPEN_SEARCH_TEMPLATE = " $( pwd ) /opensearch.xml "
2023-08-02 07:18:21 -07:00
export CONFIG_NGINX_TEMPLATE = "/etc/nginx/http.d/librey.conf"
2023-02-11 10:55:17 -08:00
2023-08-02 07:18:21 -07:00
# Configure 'opensearch.xml' with librey configuration metadata, such as the encoding and the host that stores the site
2023-02-11 08:20:40 -08:00
# These configurations will replace the 'opensearch.xml' inside '.dockers/templates' for the best setup for your instance
2023-08-02 07:18:21 -07:00
export OPEN_SEARCH_TITLE = ${ OPEN_SEARCH_TITLE :- "LibreY" }
2023-02-11 18:08:53 -08:00
export OPEN_SEARCH_DESCRIPTION = ${ OPEN_SEARCH_DESCRIPTION :- "Framework and javascript free privacy respecting meta search engine" }
export OPEN_SEARCH_ENCODING = ${ OPEN_SEARCH_ENCODING :- "UTF-8" }
2023-08-02 07:18:21 -07:00
export OPEN_SEARCH_LONG_NAME = ${ OPEN_SEARCH_LONG_NAME :- "LibreY Search" }
2023-02-12 06:13:58 -08:00
export OPEN_SEARCH_HOST = ${ OPEN_SEARCH_HOST :- "127.0.0.1" }
2023-02-11 08:20:40 -08:00
# Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups
# These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
2023-03-07 13:33:19 -08:00
export CONFIG_GOOGLE_DOMAIN = " ${ CONFIG_GOOGLE_DOMAIN :- "com" } "
export CONFIG_GOOGLE_LANGUAGE_SITE = " ${ CONFIG_GOOGLE_LANGUAGE_SITE :- "en" } "
export CONFIG_GOOGLE_LANGUAGE_RESULTS = " ${ CONFIG_GOOGLE_LANGUAGE_RESULTS :- "en" } "
2023-08-17 12:07:17 -07:00
export CONFIG_GOOGLE_NUMBER_OF_RESULTS = " ${ CONFIG_GOOGLE_NUMBER_OF_RESULTS :- "10" } "
2023-08-17 13:12:04 -07:00
export CONFIG_INSTANCE_FALLBACK = " ${ CONFIG_INSTANCE_FALLBACK } :-true}
2023-03-07 13:33:19 -08:00
export CONFIG_INVIDIOUS_INSTANCE = " ${ CONFIG_INVIDIOUS_INSTANCE :- "invidious.snopyta.org" } "
2023-02-11 08:20:40 -08:00
export CONFIG_HIDDEN_SERVICE_SEARCH = ${ CONFIG_HIDDEN_SERVICE_SEARCH :- false }
export CONFIG_DISABLE_BITTORRENT_SEARCH = ${ CONFIG_DISABLE_BITTORRENT_SEARCH :- false }
2023-03-07 13:33:19 -08:00
export CONFIG_BITTORRENT_TRACKERS = " ${ CONFIG_BITTORRENT_TRACKERS :- "&tr=http://nyaa.tracker.wf:7777/announce&tr=udp://open.stealth.si:80/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://exodus.desync.com:6969/announce&tr=udp://tracker.torrent.eu.org:451/announce" } "
2023-02-11 08:20:40 -08:00
2023-08-02 07:18:21 -07:00
# The settings that will be used to handle Wikipedia results displayed on the librey search page
2023-02-18 09:16:25 -08:00
# the settings below can be edited via environment variables.
2023-02-18 09:37:02 -08:00
export CONFIG_WIKIPEDIA_LANGUAGE = ${ CONFIG_WIKIPEDIA_LANGUAGE :- ${ CONFIG_GOOGLE_LANGUAGE } }
2023-02-18 09:16:25 -08:00
2023-02-11 08:20:40 -08:00
# Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers
2023-08-02 07:18:21 -07:00
# A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librey
2023-02-11 18:32:45 -08:00
export APP_INVIDIOUS = ${ APP_INVIDIOUS :- "" }
export APP_RIMGO = ${ APP_RIMGO :- "" }
export APP_SCRIBE = ${ APP_SCRIBE :- "" }
export APP_GOTHUB = ${ APP_GOTHUB :- "" }
export APP_NITTER = ${ APP_NITTER :- "" }
export APP_LIBREREDDIT = ${ APP_LIBREREDDIT :- "" }
export APP_PROXITOK = ${ APP_PROXITOK :- "" }
export APP_WIKILESS = ${ APP_WIKILESS :- "" }
export APP_QUETRE = ${ APP_QUETRE :- "" }
export APP_LIBREMDB = ${ APP_LIBREMDB :- "" }
export APP_BREEZEWIKI = ${ APP_BREEZEWIKI :- "" }
export APP_ANONYMOUS_OVERFLOW = ${ APP_ANONYMOUS_OVERFLOW :- "" }
2023-03-26 17:10:15 -07:00
export APP_SUDS = ${ APP_SUDS :- "" }
2023-04-24 16:19:46 -07:00
export APP_BIBLIOREADS = ${ APP_BIBLIOREADS :- "" }
2023-02-11 08:20:40 -08:00
2023-08-17 12:48:12 -07:00
export CONFIG_TEXT_SEARCH_ENGINE = ${ CONFIG_TEXT_SEARCH_ENGINE :- "google" }
2023-02-11 08:20:40 -08:00
# GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests
# Generally, a proxy is needed when your IP address is blocked by search engines in response to multiple requests within a short time frame. In these cases, it is recommended to use rotating proxies
export CURLOPT_PROXY_ENABLED = ${ CURLOPT_PROXY_ENABLED :- false }
2023-02-11 18:32:45 -08:00
export CURLOPT_PROXY = ${ CURLOPT_PROXY :- "" }
2023-08-17 12:15:11 -07:00
export CURLOPT_PROXYTYPE = ${ CURLOPT_PROXYTYPE :- "CURLPROXY_HTTP" }
2023-02-11 08:20:40 -08:00
export CURLOPT_RETURNTRANSFER = ${ CURLOPT_RETURNTRANSFER :- true }
2023-03-13 14:44:20 -07:00
export CURLOPT_ENCODING = ${ CURLOPT_ENCODING :- "" }
2023-03-07 13:33:19 -08:00
export CURLOPT_USERAGENT = " ${ 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" } "
export CURLOPT_CUSTOMREQUEST = " ${ CURLOPT_CUSTOMREQUEST :- "GET" } "
2023-02-11 08:20:40 -08:00
export CURLOPT_MAXREDIRS = ${ CURLOPT_MAXREDIRS :- 5 }
export CURLOPT_TIMEOUT = ${ CURLOPT_TIMEOUT :- 18 }
2023-03-07 13:33:19 -08:00
export CURLOPT_VERBOSE = ${ CURLOPT_VERBOSE :- true }
2023-02-11 10:55:17 -08:00
2023-02-11 11:53:22 -08:00
# These shell functions will be available for use by any function calls
function AwkTrim( ) { awk '{$1=$1};1' ; }