'searxng' removed from services

This commit is contained in:
Aykhan Shahsuvarov 2025-03-06 23:05:07 +00:00
parent ce8d530592
commit 60b9938484
8 changed files with 0 additions and 180 deletions

View File

@ -25,8 +25,3 @@ VAULTWARDEN_KEY=
############# Sftpgo ############# ############# Sftpgo #############
SFTPGO_DOMAIN= SFTPGO_DOMAIN=
############# Searxng #############
SEARXNG_DOMAIN=
SEARXNG_CRT=
SEARXNG_KEY=

View File

@ -96,103 +96,6 @@
} }
} }
############## searxng ##############
{$SEARXNG_DOMAIN} {
tls /etc/ssl/custom/{$SEARXNG_CRT} /etc/ssl/custom/{$SEARXNG_KEY}
request_body {
max_size 128MB
}
@api {
path /config
path /healthz
path /stats/errors
path /stats/checker
}
@static {
path /static/*
}
@notstatic {
not path /static/*
}
@imageproxy {
path /image_proxy
}
@notimageproxy {
not path /image_proxy
}
header {
# Enable HTTP Strict Transport Security (HSTS) to force clients to always connect via HTTPS
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
# Enable cross-site filter (XSS) and tell browser to block detected attacks
X-XSS-Protection "1; mode=block"
# Prevent some browsers from MIME-sniffing a response away from the declared Content-Type
X-Content-Type-Options "nosniff"
# Disable some features
Permissions-Policy "accelerometer=(),ambient-light-sensor=(),autoplay=(),camera=(),encrypted-media=(),focus-without-user-activation=(),geolocation=(),gyroscope=(),magnetometer=(),microphone=(),midi=(),payment=(),picture-in-picture=(),speaker=(),sync-xhr=(),usb=(),vr=()"
# Disable some features (legacy)
Feature-Policy "accelerometer 'none';ambient-light-sensor 'none'; autoplay 'none';camera 'none';encrypted-media 'none';focus-without-user-activation 'none'; geolocation 'none';gyroscope 'none';magnetometer 'none';microphone 'none';midi 'none';payment 'none';picture-in-picture 'none'; speaker 'none';sync-xhr 'none';usb 'none';vr 'none'"
# Referer
Referrer-Policy "no-referrer"
# X-Robots-Tag
X-Robots-Tag "noindex, noarchive, nofollow"
# Remove Server header
-Server
}
header @api {
Access-Control-Allow-Methods "GET, OPTIONS"
Access-Control-Allow-Origin "*"
}
# Cache
header @static {
# Cache
Cache-Control "public, max-age=31536000"
defer
}
header @notstatic {
# No Cache
Cache-Control "no-cache, no-store"
Pragma "no-cache"
}
# CSP (see http://content-security-policy.com/ )
header @imageproxy {
Content-Security-Policy "default-src 'none'; img-src 'self' data:"
}
header @notimageproxy {
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 'self' data: https://*.tile.openstreetmap.org; 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"
}
# SearXNG
handle {
encode zstd gzip
reverse_proxy searxng:8080 {
header_up X-Forwarded-Port {http.request.port}
header_up X-Forwarded-Proto {http.request.scheme}
header_up X-Real-IP {http.request.header.Cf-Connecting-Ip}
header_up X-Forwarded-For {http.request.header.Cf-Connecting-Ip}
header_up X-Country-Code {http.request.header.Cf-Ipcountry}
header_up -CF-*
}
}
}
import Caddyfile.private import Caddyfile.private

19
main.sh
View File

@ -55,7 +55,6 @@ check_docker_compose() {
generate_env_files() { generate_env_files() {
cp --update=none ./gitea/.env.example ./gitea/.env cp --update=none ./gitea/.env.example ./gitea/.env
cp --update=none ./searxng/.env.example ./searxng/.env
cp --update=none ./sftpgo/.env.example ./sftpgo/.env cp --update=none ./sftpgo/.env.example ./sftpgo/.env
cp --update=none ./vaultwarden/.env.example ./vaultwarden/.env cp --update=none ./vaultwarden/.env.example ./vaultwarden/.env
cp --update=none ./wg_easy/.env.example ./wg_easy/.env cp --update=none ./wg_easy/.env.example ./wg_easy/.env
@ -87,15 +86,6 @@ start_services() {
exit 1 exit 1
fi fi
echo "Starting searxng..."
$DOCKER_COMPOSE_COMMAND -f ./searxng/docker-compose.yml up -d
if [ $? -eq 0 ]; then
print_success "Searxng started successfully."
else
print_error "failed to start Searxng!"
exit 1
fi
echo "Starting sftpgo..." echo "Starting sftpgo..."
$DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml up -d $DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml up -d
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@ -161,15 +151,6 @@ stop_services() {
exit 1 exit 1
fi fi
echo "Stopping searxng..."
$DOCKER_COMPOSE_COMMAND -f ./searxng/docker-compose.yml down
if [ $? -eq 0 ]; then
print_success "Searxng stopped successfully."
else
print_error "failed to stop Searxng!"
exit 1
fi
echo "Stopping sftpgo..." echo "Stopping sftpgo..."
$DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml down $DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml down
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then

View File

@ -1,14 +0,0 @@
# By default listen on https://localhost
# To change this:
# * uncomment SEARXNG_HOSTNAME, and replace <host> by the SearXNG hostname
# * uncomment LETSENCRYPT_EMAIL, and replace <email> by your email (require to create a Let's Encrypt certificate)
SEARXNG_HOSTNAME=
# LETSENCRYPT_EMAIL=<email>
# Optional:
# 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
# More workers (= processes) means that more search requests can be handled at the same time, but it also causes more resource usage
# SEARXNG_UWSGI_WORKERS=4
# SEARXNG_UWSGI_THREADS=4

View File

@ -1,3 +0,0 @@
/searxng/*
/valkey-data2/*
!.gitkeep

View File

@ -1,42 +0,0 @@
networks:
searxng:
external: false
caddy:
name: caddy
driver: bridge
external: true
services:
redis:
container_name: searxng_redis
image: docker.io/valkey/valkey:8-alpine
command: valkey-server --save 30 1 --loglevel warning
restart: unless-stopped
networks:
- searxng
volumes:
- ./data/valkey-data2:/data
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
searxng:
container_name: searxng
image: docker.io/searxng/searxng:2024.12.1-0245e82bd
restart: unless-stopped
networks:
- searxng
- caddy
volumes:
- ./data/searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"