12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- LXC_SUITE_NAME="searx"
- lxc_set_suite_env() {
-
- export LINUXCONTAINERS_ORG_NAME="${LINUXCONTAINERS_ORG_NAME:-images}"
- export LXC_HOST_PREFIX="${LXC_SUITE_NAME:-searx}"
- export LXC_SUITE=(
-
-
- "$LINUXCONTAINERS_ORG_NAME:ubuntu/18.04" "ubu1804"
- "$LINUXCONTAINERS_ORG_NAME:ubuntu/20.04" "ubu2004"
- "$LINUXCONTAINERS_ORG_NAME:ubuntu/20.10" "ubu2010"
-
- "$LINUXCONTAINERS_ORG_NAME:fedora/33" "fedora33"
-
- "$LINUXCONTAINERS_ORG_NAME:archlinux" "archlinux"
-
- "$LINUXCONTAINERS_ORG_NAME:centos/7" "centos7"
- )
- PUBLIC_URL="${PUBLIC_URL:-http://$(uname -n)/searx}"
- if in_container; then
-
- PUBLIC_URL="http://$(primary_ip)/searx"
-
- FILTRON_API="0.0.0.0:4005"
- FILTRON_LISTEN="0.0.0.0:4004"
- MORTY_LISTEN="0.0.0.0:3000"
-
- export PUBLIC_URL FILTRON_API FILTRON_LISTEN MORTY_LISTEN
- fi
- }
- lxc_suite_install_info() {
- (
- lxc_set_suite_env
- cat <<EOF
- LXC suite: ${LXC_SUITE_NAME} --> ${PUBLIC_URL}
- suite includes searx, morty & filtron
- suite images:
- $(echo " ${LOCAL_IMAGES[*]}" | $FMT)
- suite containers:
- $(echo " ${CONTAINERS[*]}" | $FMT)
- EOF
- )
- }
- lxc_suite_install() {
- (
- lxc_set_suite_env
- FORCE_TIMEOUT=0
- export FORCE_TIMEOUT
- "${LXC_REPO_ROOT}/utils/searx.sh" install all
- "${LXC_REPO_ROOT}/utils/morty.sh" install all
- "${LXC_REPO_ROOT}/utils/filtron.sh" install all
- rst_title "suite installation finished ($(hostname))" part
- lxc_suite_info
- echo
- )
- }
- lxc_suite_info() {
- (
- lxc_set_suite_env
- for ip in $(global_IPs) ; do
- if [[ $ip =~ .*:.* ]]; then
- info_msg "(${ip%|*}) IPv6: http://[${ip#*|}]"
- else
-
-
- info_msg "(${ip%|*}) filtron: http://${ip#*|}:4004/ $PUBLIC_URL"
- info_msg "(${ip%|*}) morty: http://${ip#*|}:3000/ $PUBLIC_URL_MORTY"
- info_msg "(${ip%|*}) docs-live: http://${ip#*|}:8080/"
- fi
- done
- )
- }
|