searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.01k stars 247 forks source link

Trying to use nginx (acme-companion) instead of Caddy #199

Closed airdogvan closed 7 months ago

airdogvan commented 7 months ago

Added a comment to this issue but as it was closed maybe nobody read it.

I also have the same problem. All my other stacks are working with this config but searxng gives me an error. My docker-compose file:

 version: '3.7'

services:

  redis:
    container_name: redisng
    image: "redis:alpine"
    command: redis-server --save "" --appendonly "no"
    networks:
      - searxng
    tmpfs:
      - /var/lib/redis
    cap_drop:
      - ALL
    cap_add:
      - SETGID
      - SETUID
      - DAC_OVERRIDE

  searxng:
    container_name: searxngng
    image: searxng/searxng:latest
    networks:
      - searxng
      - acme-companion_proxy

    volumes:
      - ./searxng:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=https://xxx.xxx.com
      - VIRTUAL_HOST=xxx.xxx.com
      - LETSENCRYPT_HOST=xxx.xxx.com
      - LETSENCRYPT_EMAIL=xx@xxr.xx
      - VIRTUAL_PORT=8080
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
networks:
  searxng:
  acme-companion_proxy:
    external: true  

.env file:

SEARXNG_HOSTNAME=xxx.xxx.com

Part of the log (too long to quote all of it)

Beginning:

searxngng  | WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f5d92882f78 pid: 10 (default app)
searxngng  | 2023-11-25 19:19:38,781 ERROR:searx.engines.soundcloud: Fail to initialize
searxngng  | Traceback (most recent call last):
searxngng  |   File "/usr/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 190, in connect_tcp
searxngng  |     addr_obj = ip_address(remote_host)
searxngng  |                ^^^^^^^^^^^^^^^^^^^^^^^
searxngng  |   File "/usr/lib/python3.11/ipaddress.py", line 54, in ip_address
searxngng  |     raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
searxngng  | ValueError: 'soundcloud.com' does not appear to be an IPv4 or IPv6 address

End:

searxngng  |     self.gen.throw(typ, value, traceback)
searxngng  |   File "/usr/lib/python3.11/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
searxngng  |     raise mapped_exc(message) from exc
searxngng  | httpx.ConnectError: [Errno -2] Name does not resolve

As said all my other stacks work with this config, not sure what I'm missing here...