Spaces:
Build error
Build error
Basant Amatya
commited on
Commit
·
975d4c4
1
Parent(s):
1aa8de2
searxng folder added
Browse files- Dockerfile +2 -10
- searxng/limiter.toml +3 -0
- searxng/settings.yml +17 -0
- searxng/uwsgi.ini +50 -0
Dockerfile
CHANGED
@@ -1,17 +1,9 @@
|
|
1 |
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
-
FROM
|
|
|
5 |
|
6 |
-
RUN useradd -m -u 1000 user
|
7 |
-
USER user
|
8 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
9 |
|
10 |
-
WORKDIR /app
|
11 |
-
|
12 |
-
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
-
|
15 |
-
COPY --chown=user . /app
|
16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
17 |
|
|
|
1 |
# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
+
FROM docker.io/searxng/searxng:latest
|
5 |
+
EXPOSE 8080/tcp
|
6 |
|
|
|
|
|
|
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
9 |
|
searxng/limiter.toml
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[botdetection.ip_limit]
|
2 |
+
# activate link_token method in the ip_limit method
|
3 |
+
link_token = true
|
searxng/settings.yml
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
use_default_settings: true
|
2 |
+
|
3 |
+
general:
|
4 |
+
instance_name: 'searxng'
|
5 |
+
|
6 |
+
search:
|
7 |
+
autocomplete: 'google'
|
8 |
+
formats:
|
9 |
+
- html
|
10 |
+
- json
|
11 |
+
|
12 |
+
server:
|
13 |
+
secret_key: 'a2fb23f1b02e6ee83875b09826990de0f6bd908b6638e8c10277d415f6ab852b' # Is overwritten by ${SEARXNG_SECRET}
|
14 |
+
|
15 |
+
engines:
|
16 |
+
- name: wolframalpha
|
17 |
+
disabled: false
|
searxng/uwsgi.ini
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[uwsgi]
|
2 |
+
# Who will run the code
|
3 |
+
uid = searxng
|
4 |
+
gid = searxng
|
5 |
+
|
6 |
+
# Number of workers (usually CPU count)
|
7 |
+
# default value: %k (= number of CPU core, see Dockerfile)
|
8 |
+
workers = %k
|
9 |
+
|
10 |
+
# Number of threads per worker
|
11 |
+
# default value: 4 (see Dockerfile)
|
12 |
+
threads = 4
|
13 |
+
|
14 |
+
# The right granted on the created socket
|
15 |
+
chmod-socket = 666
|
16 |
+
|
17 |
+
# Plugin to use and interpreter config
|
18 |
+
single-interpreter = true
|
19 |
+
master = true
|
20 |
+
plugin = python3
|
21 |
+
lazy-apps = true
|
22 |
+
enable-threads = 4
|
23 |
+
|
24 |
+
# Module to import
|
25 |
+
module = searx.webapp
|
26 |
+
|
27 |
+
# Virtualenv and python path
|
28 |
+
pythonpath = /usr/local/searxng/
|
29 |
+
chdir = /usr/local/searxng/searx/
|
30 |
+
|
31 |
+
# automatically set processes name to something meaningful
|
32 |
+
auto-procname = true
|
33 |
+
|
34 |
+
# Disable request logging for privacy
|
35 |
+
disable-logging = true
|
36 |
+
log-5xx = true
|
37 |
+
|
38 |
+
# Set the max size of a request (request-body excluded)
|
39 |
+
buffer-size = 8192
|
40 |
+
|
41 |
+
# No keep alive
|
42 |
+
# See https://github.com/searx/searx-docker/issues/24
|
43 |
+
add-header = Connection: close
|
44 |
+
|
45 |
+
# uwsgi serves the static files
|
46 |
+
static-map = /static=/usr/local/searxng/searx/static
|
47 |
+
# expires set to one day
|
48 |
+
static-expires = /* 86400
|
49 |
+
static-gzip-all = True
|
50 |
+
offload-threads = 4
|