From 569c9f97b5b6862ff58e48692f8b185262317034 Mon Sep 17 00:00:00 2001 From: Iyas Altawil Date: Fri, 27 Jun 2025 23:13:41 +0330 Subject: [PATCH] update --- container/Dockerfile | 16 ++++----- searx/settings-iyas.yml | 77 +++++++++++++++++++++++++++++++++++++++++ searx/uwsgi-iyas.ini | 55 +++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 8 deletions(-) create mode 100644 searx/settings-iyas.yml create mode 100644 searx/uwsgi-iyas.ini diff --git a/container/Dockerfile b/container/Dockerfile index d7bc838..4abf14a 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -46,20 +46,20 @@ LABEL org.opencontainers.image.authors="searxng <$GIT_URL>" \ org.opencontainers.image.version="$SEARXNG_GIT_VERSION" ENV SEARXNG_VERSION="$SEARXNG_GIT_VERSION" \ - INSTANCE_NAME="SearXNG" \ - AUTOCOMPLETE="" \ - BASE_URL="" \ - BIND_ADDRESS="[::]:8080" \ - SEARXNG_SETTINGS_PATH="$CONFIG_PATH/settings.yml" \ - UWSGI_SETTINGS_PATH="$CONFIG_PATH/uwsgi.ini" \ +# INSTANCE_NAME="SearXNG" \ +# AUTOCOMPLETE="" \ + BASE_URL="saya.liara.run" \ + BIND_ADDRESS="[::]:80" \ + SEARXNG_SETTINGS_PATH="$CONFIG_PATH/settings-iyas.yml" \ + UWSGI_SETTINGS_PATH="$CONFIG_PATH/uwsgi-iyas.ini" \ UWSGI_WORKERS="%k" \ UWSGI_THREADS="4" VOLUME $CONFIG_PATH VOLUME $DATA_PATH -EXPOSE 8080 +EXPOSE 80 -HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:8080/healthz || exit 1 +HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:80/healthz || exit 1 ENTRYPOINT ["/usr/local/searxng/entrypoint.sh"] diff --git a/searx/settings-iyas.yml b/searx/settings-iyas.yml new file mode 100644 index 0000000..3c7c4ac --- /dev/null +++ b/searx/settings-iyas.yml @@ -0,0 +1,77 @@ +# see https://docs.searxng.org/admin/settings/settings.html#settings-use-default-settings +use_default_settings: + engines: + keep_only: + - google + - brave + - yandex +server: + # base_url is defined in the SEARXNG_BASE_URL environment variable, see .env and docker-compose.yml + secret_key: "j2t7uEGGHwoWX4G7ZzzA9RLWZ4EjiPQ" # change this! + limiter: false # enable this when running the instance for a public usage on the internet + image_proxy: true +ui: + static_use_hash: false + default_locale: "fa-IR" + query_in_title: true + infinite_scroll: false + center_alignment: false + cache_url: https://web.archive.org/web/ + default_theme: simple + theme_args: + simple_style: auto + search_on_category_select: true + hotkeys: default + url_formatting: pretty + static_use_favicons: true + categories_order: + - general + - images + - videos +redis: + url: redis://redis:6379/0 +search: + safe_search: 2 + autocomplete: "google" + default_lang: "fa" + favicon_resolver: "yandex" +engines: + - name: google images + engine: google_images + shortcut: gimg + categories: images + - name: youtube + engine: google_videos + shortcut: yt + categories: videos + - name: yandex images + engine: yandex + categories: images + search_type: images + shortcut: ydi + - name: vimeo + engine: vimeo + shortcut: vm + - name: brave.images + engine: brave + network: brave + shortcut: brimg + categories: [images, web] + brave_category: images + - name: brave.videos + engine: brave + network: brave + shortcut: brvid + categories: [videos, web] + brave_category: videos +general: + debug: false + instance_name: "سایا" + privacypolicy_url: false + donation_url: false + contact_url: false +categories_as_tabs: + general: + images: + videos: + music: diff --git a/searx/uwsgi-iyas.ini b/searx/uwsgi-iyas.ini new file mode 100644 index 0000000..c3860b3 --- /dev/null +++ b/searx/uwsgi-iyas.ini @@ -0,0 +1,55 @@ +[uwsgi] +# Listening address +# default value: [::]:8080 (see Dockerfile) +http-socket = $(BIND_ADDRESS) + +# Who will run the code +uid = searxng +gid = searxng + +# Number of workers (usually CPU count) +# default value: %k (= number of CPU core, see Dockerfile) +workers = 4 + +# Number of threads per worker +# default value: 4 (see Dockerfile) +threads = 4 + +# The right granted on the created socket +chmod-socket = 666 + +# Plugin to use and interpreter config +single-interpreter = true +master = true +lazy-apps = true +enable-threads = 4 + +# Module to import +module = searx.webapp + +# Virtualenv and python path +pythonpath = /usr/local/searxng/ +chdir = /usr/local/searxng/searx/ + +# automatically set processes name to something meaningful +auto-procname = true + +# Disable request logging for privacy +disable-logging = true +log-5xx = true + +# Set the max size of a request (request-body excluded) +buffer-size = 8192 + +# No keep alive +# See https://github.com/searx/searx-docker/issues/24 +add-header = Connection: close + +# Follow SIGTERM convention +# See https://github.com/searxng/searxng/issues/3427 +die-on-term + +# uwsgi serves the static files +static-map = /static=/usr/local/searxng/searx/static +static-gzip-all = True +offload-threads = 4