From 1f51dace4108b56426a633a2f5f5ed9ea6cd53d2 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 22 Nov 2025 13:55:35 +0000 Subject: [PATCH] fix: Use custom entrypoint script for SearXNG limiter.toml - Create entrypoint.sh script that creates limiter.toml before SearXNG starts - Script removes any existing limiter.toml (file or directory) first - Then creates proper limiter.toml with bot detection bypass - Finally executes the original SearXNG entrypoint - This approach is more reliable than inline commands --- docker-compose.yml | 2 ++ searxng/entrypoint.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 searxng/entrypoint.sh diff --git a/docker-compose.yml b/docker-compose.yml index 46bdf27..cb7776a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,8 @@ services: - SEARXNG_SECRET=priceflow-searxng-secret volumes: - ./searxng/settings.yml:/etc/searxng/settings.yml:ro + - ./searxng/entrypoint.sh:/entrypoint.sh:ro + entrypoint: ["/bin/sh", "/entrypoint.sh"] dns: - 8.8.8.8 - 8.8.4.4 diff --git a/searxng/entrypoint.sh b/searxng/entrypoint.sh new file mode 100755 index 0000000..39a15f0 --- /dev/null +++ b/searxng/entrypoint.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Custom entrypoint for SearXNG - creates limiter.toml before starting + +# Remove any existing limiter.toml (file or directory) +rm -rf /etc/searxng/limiter.toml + +# Create limiter.toml to disable bot detection +cat > /etc/searxng/limiter.toml << 'EOF' +[botdetection.ip_limit] +link_token = false + +[botdetection.ip_lists] +pass_ip = [ + "0.0.0.0/0", + "127.0.0.0/8", + "10.0.0.0/8", + "172.16.0.0/12", + "192.168.0.0/16", + "::/0" +] +block_ip = [] +EOF + +echo "limiter.toml created successfully" + +# Execute the original entrypoint +exec /usr/local/searxng/dockerfiles/docker-entrypoint.sh