Krasimir Kazakov 5 днів тому
коміт
7ed1ae1788
3 змінених файлів з 132 додано та 0 видалено
  1. 11 0
      .env
  2. 73 0
      config/settings.yml
  3. 48 0
      docker-compose.yaml

+ 11 - 0
.env

@@ -0,0 +1,11 @@
+# SearXNG environment configuration
+
+# Hostname used in the base URL (default: localhost)
+SEARXNG_HOSTNAME=localhost
+
+# Port to expose SearXNG on the host (default: 8080)
+SEARXNG_PORT=8889
+
+# uWSGI worker and thread counts
+UWSGI_WORKERS=4
+UWSGI_THREADS=4

+ 73 - 0
config/settings.yml

@@ -0,0 +1,73 @@
+# SearXNG settings - see https://docs.searxng.org/admin/settings/settings.html
+
+use_default_settings: true
+
+general:
+  debug: false
+  instance_name: "SearXNG"
+  enable_metrics: true
+
+search:
+  safe_search: 0
+  autocomplete: ""
+  default_lang: "auto"
+  ban_time_on_fail: 5
+  max_ban_time_on_fail: 120
+  formats:
+    - html
+    - json
+
+server:
+  # base_url is set via environment variable SEARXNG_BASE_URL
+  secret_key: "96ef80049f84872eb441964ccb4bac85422b21ada9403bfbf88e67df7094b71e"
+  limiter: true
+  image_proxy: true
+  method: "GET"
+
+redis:
+  url: redis://searxng-redis:6379/0
+
+ui:
+  static_use_hash: true
+  default_locale: ""
+  query_in_title: false
+  infinite_scroll: false
+  center_alignment: false
+  default_theme: simple
+  theme_args:
+    simple_style: auto
+
+# Enabled engines - add or remove as needed
+engines:
+  - name: google
+    engine: google
+    shortcut: g
+
+  - name: bing
+    engine: bing
+    shortcut: b
+
+  - name: duckduckgo
+    engine: duckduckgo
+    shortcut: ddg
+
+  - name: wikipedia
+    engine: wikipedia
+    shortcut: wp
+    categories: general
+
+  - name: github
+    engine: github
+    shortcut: gh
+
+  - name: stackoverflow
+    engine: stackoverflow
+    shortcut: so
+
+outgoing:
+  request_timeout: 3.0
+  max_request_timeout: 15.0
+  useragent_suffix: ""
+  pool_connections: 100
+  pool_maxsize: 20
+  enable_http2: true

+ 48 - 0
docker-compose.yaml

@@ -0,0 +1,48 @@
+services:
+  redis:
+    image: valkey/valkey:8-alpine
+    container_name: searxng-redis
+    restart: unless-stopped
+    command: valkey-server --save 30 1 --loglevel warning
+    volumes:
+      - /storage/searxng/redis:/data
+    networks:
+      - searxng
+    cap_drop:
+      - ALL
+    cap_add:
+      - SETGID
+      - SETUID
+      - DAC_OVERRIDE
+
+  searxng:
+    image: searxng/searxng:latest
+    container_name: searxng
+    restart: unless-stopped
+    ports:
+      - "${SEARXNG_PORT:-8080}:8080"
+    volumes:
+      - /storage/searxng/config:/etc/searxng
+    environment:
+      - SEARXNG_BASE_URL=http://${SEARXNG_HOSTNAME:-localhost}:${SEARXNG_PORT:-8080}/
+      - UWSGI_WORKERS=${UWSGI_WORKERS:-4}
+      - UWSGI_THREADS=${UWSGI_THREADS:-4}
+    networks:
+      - searxng
+    cap_drop:
+      - ALL
+    cap_add:
+      - CHOWN
+      - SETGID
+      - SETUID
+    depends_on:
+      - redis
+    logging:
+      driver: json-file
+      options:
+        max-size: "10m"
+        max-file: "3"
+
+networks:
+  searxng:
+    driver: bridge