diff --git a/caddy/.env.example b/caddy/.env.example index 870e28b..73a3528 100644 --- a/caddy/.env.example +++ b/caddy/.env.example @@ -25,8 +25,3 @@ VAULTWARDEN_KEY= ############# Sftpgo ############# SFTPGO_DOMAIN= - -############# Searxng ############# -SEARXNG_DOMAIN= -SEARXNG_CRT= -SEARXNG_KEY= diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 3daa909..e5b1f5e 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -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 diff --git a/main.sh b/main.sh index c41d2ee..33b3aae 100755 --- a/main.sh +++ b/main.sh @@ -55,7 +55,6 @@ check_docker_compose() { generate_env_files() { 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 ./vaultwarden/.env.example ./vaultwarden/.env cp --update=none ./wg_easy/.env.example ./wg_easy/.env @@ -87,15 +86,6 @@ start_services() { exit 1 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..." $DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml up -d if [ $? -eq 0 ]; then @@ -161,15 +151,6 @@ stop_services() { exit 1 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..." $DOCKER_COMPOSE_COMMAND -f ./sftpgo/docker-compose.yml down if [ $? -eq 0 ]; then diff --git a/searxng/.env.example b/searxng/.env.example deleted file mode 100644 index ed33fc4..0000000 --- a/searxng/.env.example +++ /dev/null @@ -1,14 +0,0 @@ -# By default listen on https://localhost -# To change this: -# * uncomment SEARXNG_HOSTNAME, and replace by the SearXNG hostname -# * uncomment LETSENCRYPT_EMAIL, and replace by your email (require to create a Let's Encrypt certificate) - -SEARXNG_HOSTNAME= -# LETSENCRYPT_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 diff --git a/searxng/data/.gitignore b/searxng/data/.gitignore deleted file mode 100644 index 745b149..0000000 --- a/searxng/data/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/searxng/* -/valkey-data2/* -!.gitkeep \ No newline at end of file diff --git a/searxng/data/searxng/.gitkeep b/searxng/data/searxng/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/searxng/data/valkey-data2/.gitkeep b/searxng/data/valkey-data2/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/searxng/docker-compose.yml b/searxng/docker-compose.yml deleted file mode 100644 index 9e8424c..0000000 --- a/searxng/docker-compose.yml +++ /dev/null @@ -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"