Bugfix Searxng Redis replaced with Valkey in installscript (#6831)
This commit is contained in:
parent
51a1d3c0ef
commit
9b9faf7a53
@ -13,34 +13,36 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies (Patience)"
|
msg_info "Installing SearXNG dependencies"
|
||||||
|
echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list
|
||||||
|
$STD apt-get update
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
redis-server \
|
python3-dev python3-babel python3-venv python-is-python3 \
|
||||||
build-essential \
|
uwsgi uwsgi-plugin-python3 \
|
||||||
libffi-dev \
|
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev sudo valkey
|
||||||
libssl-dev \
|
msg_ok "Installed dependencies"
|
||||||
git
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Setup Python3"
|
msg_info "Creating user and preparing directories"
|
||||||
$STD apt-get install -y \
|
useradd --system --shell /bin/bash --home-dir "/usr/local/searxng" --comment 'Privacy-respecting metasearch engine' searxng || true
|
||||||
python3 \
|
mkdir -p /usr/local/searxng
|
||||||
python3-{pip,venv,yaml,dev}
|
chown -R searxng:searxng /usr/local/searxng
|
||||||
$STD pip install --upgrade pip setuptools wheel
|
msg_ok "User and directories ready"
|
||||||
$STD pip install pyyaml
|
|
||||||
msg_ok "Setup Python3"
|
|
||||||
|
|
||||||
msg_info "Setup SearXNG"
|
msg_info "Cloning SearXNG source"
|
||||||
mkdir -p /usr/local/searxng /etc/searxng
|
$STD sudo -H -u searxng git clone https://github.com/searxng/searxng /usr/local/searxng/searxng-src
|
||||||
useradd -d /etc/searxng searxng
|
msg_ok "Cloned SearXNG"
|
||||||
chown searxng:searxng /usr/local/searxng /etc/searxng
|
|
||||||
$STD git clone https://github.com/searxng/searxng.git /usr/local/searxng/searxng-src
|
msg_info "Creating Python virtual environment"
|
||||||
cd /usr/local/searxng/
|
sudo -H -u searxng bash -c "
|
||||||
sudo -u searxng python3 -m venv /usr/local/searxng/searx-pyenv
|
python3 -m venv /usr/local/searxng/searx-pyenv &&
|
||||||
source /usr/local/searxng/searx-pyenv/bin/activate
|
. /usr/local/searxng/searx-pyenv/bin/activate &&
|
||||||
$STD pip install --upgrade pip setuptools wheel
|
$STD pip install -U pip setuptools wheel pyyaml &&
|
||||||
$STD pip install pyyaml
|
$STD pip install --use-pep517 --no-build-isolation -e /usr/local/searxng/searxng-src
|
||||||
$STD pip install --use-pep517 --no-build-isolation -e /usr/local/searxng/searxng-src
|
"
|
||||||
|
msg_ok "Python environment ready"
|
||||||
|
|
||||||
|
msg_info "Configuring SearXNG settings"
|
||||||
|
mkdir -p /etc/searxng
|
||||||
SECRET_KEY=$(openssl rand -hex 32)
|
SECRET_KEY=$(openssl rand -hex 32)
|
||||||
cat <<EOF >/etc/searxng/settings.yml
|
cat <<EOF >/etc/searxng/settings.yml
|
||||||
# SearXNG settings
|
# SearXNG settings
|
||||||
@ -56,8 +58,8 @@ server:
|
|||||||
secret_key: "${SECRET_KEY}"
|
secret_key: "${SECRET_KEY}"
|
||||||
limiter: false
|
limiter: false
|
||||||
image_proxy: true
|
image_proxy: true
|
||||||
redis:
|
valkey:
|
||||||
url: "redis://127.0.0.1:6379/0"
|
url: "valkey://localhost:6379/0"
|
||||||
ui:
|
ui:
|
||||||
static_use_hash: true
|
static_use_hash: true
|
||||||
enabled_plugins:
|
enabled_plugins:
|
||||||
@ -78,16 +80,17 @@ engines:
|
|||||||
shortcut: ddg
|
shortcut: ddg
|
||||||
display_error_messages: true
|
display_error_messages: true
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chown searxng:searxng /etc/searxng/settings.yml
|
chown searxng:searxng /etc/searxng/settings.yml
|
||||||
chmod 640 /etc/searxng/settings.yml
|
chmod 640 /etc/searxng/settings.yml
|
||||||
msg_ok "Setup SearXNG"
|
msg_ok "Configured settings"
|
||||||
|
|
||||||
msg_info "Set up web services"
|
msg_info "Set up web services"
|
||||||
cat <<EOF >/etc/systemd/system/searxng.service
|
cat <<EOF >/etc/systemd/system/searxng.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=SearXNG service
|
Description=SearXNG service
|
||||||
After=network.target redis-server.service
|
After=network.target valkey-server.service
|
||||||
Wants=redis-server.service
|
Wants=valkey-server.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
|
Loading…
x
Reference in New Issue
Block a user