attributes.sh 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/sh
  2. # YOU DON'T NEED TO EDIT THIS FILE. IF YOU WANT TO SET CUSTOM ENVIRONMENT VARIABLES,
  3. # USE THE 'DOCKERFILE IMAGE' FROM ROOT DIRECTORY AND PASS THE ENVIRONMENT PARAMETERS
  4. # These templates will be used to create configuration files that incorporate values from environment variables
  5. # If these locations do not already exist within the Docker container, they will be created
  6. export CONFIG_PHP_TEMPLATE="$(pwd)/config.php"
  7. export CONFIG_OPEN_SEARCH_TEMPLATE="$(pwd)/opensearch.xml"
  8. export CONFIG_NGINX_TEMPLATE="/etc/nginx/http.d/librey.conf"
  9. # Configure 'opensearch.xml' with librey configuration metadata, such as the encoding and the host that stores the site
  10. # These configurations will replace the 'opensearch.xml' inside '.dockers/templates' for the best setup for your instance
  11. export OPEN_SEARCH_TITLE=${OPEN_SEARCH_TITLE:-"LibreY"}
  12. export OPEN_SEARCH_DESCRIPTION=${OPEN_SEARCH_DESCRIPTION:-"Framework and javascript free privacy respecting meta search engine"}
  13. export OPEN_SEARCH_ENCODING=${OPEN_SEARCH_ENCODING:-"UTF-8"}
  14. export OPEN_SEARCH_LONG_NAME=${OPEN_SEARCH_LONG_NAME:-"LibreY Search"}
  15. export OPEN_SEARCH_HOST=${OPEN_SEARCH_HOST:-"127.0.0.1"}
  16. # Replace the 'config.php' script, which contains the most common search engine configurations, with these environment setups
  17. # These environment setups can be found in 'config.php', and the default configurations can be useful for most use cases
  18. export CONFIG_GOOGLE_DOMAIN=${CONFIG_GOOGLE_DOMAIN:-"com"}
  19. export CONFIG_LANGUAGE=${CONFIG_LANGUAGE:-"en"}
  20. export CONFIG_NUMBER_OF_RESULTS=${CONFIG_NUMBER_OF_RESULTS:-10}
  21. export CONFIG_INVIDIOUS_INSTANCE=${CONFIG_INVIDIOUS_INSTANCE:-"https://invidious.snopyta.org"}
  22. export CONFIG_DISABLE_BITTORRENT_SEARCH=${CONFIG_DISABLE_BITTORRENT_SEARCH:-false}
  23. 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"}
  24. export CONFIG_HIDDEN_SERVICE_SEARCH=${CONFIG_HIDDEN_SERVICE_SEARCH:-false}
  25. export CONFIG_INSTANCE_FALLBACK="${CONFIG_INSTANCE_FALLBACK:-true}"
  26. export CONFIG_RATE_LIMIT_COOLDOWN="${CONFIG_RATE_LIMIT_COOLDOWN:-25}"
  27. export CONFIG_CACHE_TIME="${CONFIG_CACHE_TIME:-20}"
  28. export CONFIG_DISABLE_API="${CONFIG_DISABLE_API:-false}"
  29. export CONFIG_SHOW_RESULT_SOURCE="${CONFIG_SHOW_RESULT_SOURCE:-true}"
  30. export CONFIG_DEFAULT_THEME=${CONFIG_DEFAULT_THEME:-"dark"}
  31. # Supported apps integration configuration. These empty spaces can be set up using free hosts as pointers
  32. # A particular example is using the "https://yewtu.be" or a self-hosted host to integrate the invidious app to librey
  33. export APP_INVIDIOUS=${APP_INVIDIOUS:-""}
  34. export APP_RIMGO=${APP_RIMGO:-""}
  35. export APP_SCRIBE=${APP_SCRIBE:-""}
  36. export APP_GOTHUB=${APP_GOTHUB:-""}
  37. export APP_NITTER=${APP_NITTER:-""}
  38. export APP_REDLIB=${APP_REDLIB:-""}
  39. export APP_PROXITOK=${APP_PROXITOK:-""}
  40. export APP_WIKILESS=${APP_WIKILESS:-""}
  41. export APP_QUETRE=${APP_QUETRE:-""}
  42. export APP_LIBREMDB=${APP_LIBREMDB:-""}
  43. export APP_BREEZEWIKI=${APP_BREEZEWIKI:-""}
  44. export APP_ANONYMOUS_OVERFLOW=${APP_ANONYMOUS_OVERFLOW:-""}
  45. export APP_SUDS=${APP_SUDS:-""}
  46. export APP_BIBLIOREADS=${APP_BIBLIOREADS:-""}
  47. export CONFIG_TEXT_SEARCH_ENGINE=${CONFIG_TEXT_SEARCH_ENGINE:-"auto"}
  48. # GNU/Curl configurations. Leave 'CURLOPT_PROXY' blank whether you don't need to use a proxy for requests
  49. # 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
  50. export CURLOPT_PROXY_ENABLED=${CURLOPT_PROXY_ENABLED:-false}
  51. export CURLOPT_PROXY=${CURLOPT_PROXY:-""}
  52. export CURLOPT_PROXYTYPE=${CURLOPT_PROXYTYPE:-"CURLPROXY_HTTP"}
  53. export CURLOPT_RETURNTRANSFER=${CURLOPT_RETURNTRANSFER:-true}
  54. export CURLOPT_ENCODING=${CURLOPT_ENCODING:-""}
  55. export CURLOPT_USERAGENT=${CURLOPT_USERAGENT:-"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:116.0) Gecko/20100101 Firefox/116.0"}
  56. export CURLOPT_IPRESOLVE=${CURLOPT_IPRESOLVE:-"CURL_IPRESOLVE_WHATEVER"}
  57. export CURLOPT_CUSTOMREQUEST="${CURLOPT_CUSTOMREQUEST:-"GET"}"
  58. export CURLOPT_MAXREDIRS=${CURLOPT_MAXREDIRS:-5}
  59. export CURLOPT_TIMEOUT=${CURLOPT_TIMEOUT:-3}
  60. export CURLOPT_VERBOSE=${CURLOPT_VERBOSE:-true}
  61. export CURLOPT_FOLLOWLOCATION=${CURLOPT_FOLLOWLOCATION:-true}
  62. # These shell functions will be available for use by any function calls
  63. function AwkTrim() { awk '{$1=$1};1'; }