Test searxng

This commit is contained in:
Simen Røstvik 2022-11-12 03:17:06 +01:00
parent 97993f6534
commit a2da02232f
2 changed files with 194 additions and 0 deletions

172
Deployments/searxng.yaml Normal file
View File

@ -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

View File

@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: applications
namespace: argo-cd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
destination:
server: https://kubernetes.default.svc
namespace: default
project: default
source:
path: Deployments/
repoURL: https://git.roxedus.dev/Roxedus/Argo.git
targetRevision: HEAD
directory:
recurse: true
syncPolicy:
automated:
prune: true
selfHeal: true