Skip to content

Commit 9a95fb3

Browse files
committed
New migrations
1 parent d176297 commit 9a95fb3

File tree

11 files changed

+1007
-0
lines changed

11 files changed

+1007
-0
lines changed

.DS_Store

10 KB
Binary file not shown.

searxng-docker/.DS_Store

6 KB
Binary file not shown.

searxng-docker/.env

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# By default listen on https://localhost
2+
# To change this:
3+
# * uncomment SEARXNG_HOSTNAME, and replace <host> by the SearXNG hostname
4+
# * uncomment LETSENCRYPT_EMAIL, and replace <email> by your email (require to create a Let's Encrypt certificate)
5+
6+
# SEARXNG_HOSTNAME=<host>
7+
# LETSENCRYPT_EMAIL=<email>
8+
9+
# Optional:
10+
# If you run a very small or a very large instance, you might want to change the amount of used uwsgi workers and threads per worker
11+
# More workers (= processes) means that more search requests can be handled at the same time, but it also causes more resource usage
12+
13+
# SEARXNG_UWSGI_WORKERS=4
14+
# SEARXNG_UWSGI_THREADS=4

searxng-docker/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*~
2+
3+
searxng-docker.service
4+
caddy
5+
srv
6+
searxng/uwsgi.ini

searxng-docker/Caddyfile

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
admin off
3+
4+
log {
5+
output stderr
6+
format filter {
7+
# Preserves first 8 bits from IPv4 and 32 bits from IPv6
8+
request>remote_ip ip_mask 8 32
9+
request>client_ip ip_mask 8 32
10+
11+
# Remove identificable information
12+
request>remote_port delete
13+
request>headers delete
14+
request>uri query {
15+
delete url
16+
delete h
17+
delete q
18+
}
19+
}
20+
}
21+
}
22+
23+
{$SEARXNG_HOSTNAME}
24+
25+
tls {$SEARXNG_TLS}
26+
27+
encode zstd gzip
28+
29+
@api {
30+
path /config
31+
path /healthz
32+
path /stats/errors
33+
path /stats/checker
34+
}
35+
36+
@search {
37+
path /search
38+
}
39+
40+
@imageproxy {
41+
path /image_proxy
42+
}
43+
44+
@static {
45+
path /static/*
46+
}
47+
48+
header {
49+
# CSP (https://content-security-policy.com)
50+
Content-Security-Policy "upgrade-insecure-requests; default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; form-action 'self' https://github.com/searxng/searxng/issues/new; font-src 'self'; frame-ancestors 'self'; base-uri 'self'; connect-src 'self' https://overpass-api.de; img-src * data:; frame-src https://www.youtube-nocookie.com https://player.vimeo.com https://www.dailymotion.com https://www.deezer.com https://www.mixcloud.com https://w.soundcloud.com https://embed.spotify.com;"
51+
52+
# Disable some browser features
53+
Permissions-Policy "accelerometer=(),camera=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),payment=(),usb=()"
54+
55+
# Set referrer policy
56+
Referrer-Policy "no-referrer"
57+
58+
# Force clients to use HTTPS
59+
Strict-Transport-Security "max-age=31536000"
60+
61+
# Prevent MIME type sniffing from the declared Content-Type
62+
X-Content-Type-Options "nosniff"
63+
64+
# X-Robots-Tag (comment to allow site indexing)
65+
X-Robots-Tag "noindex, noarchive, nofollow"
66+
67+
# Remove "Server" header
68+
-Server
69+
}
70+
71+
header @api {
72+
Access-Control-Allow-Methods "GET, OPTIONS"
73+
Access-Control-Allow-Origin "*"
74+
}
75+
76+
route {
77+
# Cache policy
78+
header Cache-Control "max-age=0, no-store"
79+
header @search Cache-Control "max-age=5, private"
80+
header @imageproxy Cache-Control "max-age=604800, public"
81+
header @static Cache-Control "max-age=31536000, public, immutable"
82+
}
83+
84+
# SearXNG (uWSGI)
85+
reverse_proxy localhost:8080 {
86+
header_up X-Forwarded-Port {http.request.port}
87+
header_up X-Real-IP {http.request.remote.host}
88+
89+
# https://github.com/searx/searx-docker/issues/24
90+
header_up Connection "close"
91+
}

0 commit comments

Comments
 (0)