From 485f2bc2f5204ad4de829086bb39e2c29c869a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20R=C3=B8stvik?= Date: Sat, 12 Nov 2022 03:17:06 +0100 Subject: [PATCH] Test searxng --- Deployments/searxng.yaml | 172 ++++++++++++++++++ {apps.ol => apps}/templates/applications.yaml | 0 2 files changed, 172 insertions(+) create mode 100644 Deployments/searxng.yaml rename {apps.ol => apps}/templates/applications.yaml (100%) diff --git a/Deployments/searxng.yaml b/Deployments/searxng.yaml new file mode 100644 index 0000000..69a4c73 --- /dev/null +++ b/Deployments/searxng.yaml @@ -0,0 +1,172 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: searxng +spec: + replicas: 1 + revisionHistoryLimit: 3 + selector: + matchLabels: + app: searxng + template: + metadata: + labels: + app: searxng + spec: + containers: + - name: searxng + image: searxng/searxng + resources: + limits: + memory: "2G" + cpu: "1000m" + env: + - name: BASE_URL + value: http://10.0.2.6:30314 + - name: INSTANCE_NAME + value: Roxedus.com + ports: + - containerPort: 8080 + volumeMounts: + - mountPath: /etc/searxng + name: config + readOnly: true + volumes: + - name: config + configMap: + name: searxng + items: + - key: "settings" + path: "settings.yml" + - key: "uwsgi" + path: "uwsgi.ini" +--- +apiVersion: v1 +kind: Service +metadata: + name: searxng +spec: + type: NodePort + selector: + app: searxng + ports: + - port: 8080 + targetPort: 8080 + nodePort: 30314 +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: searxng +data: + settings: | + # see https://docs.searxng.org/admin/engines/settings.html#use-default-settings + use_default_settings: true + server: + secret_key: "redacted" + limiter: false + image_proxy: true + ui: + static_use_hash: true + default_theme: simple + theme_args: + simple_style: dark + infinite_scroll: true + query_in_title: true + search: + autocomplete: "google" + enabled_plugins: + - "Hash plugin" + - "Search on category select" + - "Self Informations" + - "Tracker URL remover" + - "Hostname replace" + - "Open Access DOI rewrite" + hostname_replace: + '(.*\.)?codegrepper\.com': false + '(.*\.)?w3schools\.com': false + '(.*\.)?geeksforgeeks\.org': false + '(.*\.)?stackshare\.io': false + '(.*\.)?tutorialspoint\.com': false + '(.*\.)?answeright\.com': false + '(.*\.)?askdev\.info': false + '(.*\.)?askdev\.io': false + '(.*\.)?blogmepost\.com': false + '(.*\.)?c-sharpcorner\.com': false + '(.*\.)?code-examples\.net': false + '(.*\.)?codeflow\.site': false + '(.*\.)?gitmemory\.cn': false + '(.*\.)?gitmemory\.com': false + '(.*\.)?intellipaat\.com': false + '(.*\.)?javaer101\.com': false + '(.*\.)?programmerstart\.com': false + '(.*\.)?programmersought\.com': false + '(.*\.)?qastack\.com': false + '(.*\.)?roboflow\.ai': false + '(.*\.)?stackanswers\.net': false + '(.*\.)?stackoom\.com': false + '(.*\.)?stackovernet\.com': false + '(.*\.)?stackovernet\.xyz': false + '(.*\.)?stackoverrun\.com': false + '(.*\.)?thetopsites\.net': false + '(.*\.)?ubuntugeeks\.com': false + '(.*\.)?cyberciti\.biz': false + '(.*\.)?ispycode\.com': false + '(.*\.)?reposhub\.com': false + '(.*\.)?githubmemory\.com': false + '(.*\.)?issueexplorer\.com': false + '(.*\.)?tabnine\.com': false + '(.*\.)?gitcode\.net': false + '(.*\.)?command-not-found\.com': false + '(.*\.)?im-coder\.com': false + '(.*\.)?i-harness\.com': false + uwsgi: | + [uwsgi] + # Who will run the code + uid = searxng + gid = searxng + + # Number of workers (usually CPU count) + workers = %k + threads = 4 + + # The right granted on the created socket + chmod-socket = 666 + + # Plugin to use and interpreter config + single-interpreter = true + master = true + plugin = python3 + lazy-apps = true + enable-threads = true + + # 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 + + # uwsgi serves the static files + # expires set to one year since there are hashes + static-map = /static=/usr/local/searxng/searx/static + static-expires = /* 31557600 + static-gzip-all = True + offload-threads = %k + + # Cache + cache2 = name=searxngcache,items=2000,blocks=2000,blocksize=4096,bitmap=1 diff --git a/apps.ol/templates/applications.yaml b/apps/templates/applications.yaml similarity index 100% rename from apps.ol/templates/applications.yaml rename to apps/templates/applications.yaml