services: # 使用 host 网络:容器与宿主机共享网络栈。 # 原因:本机环境 Docker bridge 模式的 NAT 出站被阻断,容器无法访问外网; # host 模式下 searxng 直接复用宿主网络可正常联网(已验证 python host-net 连 baidu:443 OK)。 searxng-valkey: image: ${SEARXNG_VALKEY_IMAGE:-ghcr.io/valkey-io/valkey:8.1.4} container_name: eai-searxng-valkey command: ["valkey-server", "--save", "", "--appendonly", "no"] restart: unless-stopped network_mode: host volumes: - searxng-valkey-data:/data searxng: image: ${SEARXNG_IMAGE:-ghcr.io/searxng/searxng:latest} container_name: eai-searxng restart: unless-stopped network_mode: host environment: SEARXNG_BASE_URL: ${SEARXNG_PUBLIC_BASE_URL:-http://127.0.0.1:18080/} SEARXNG_SECRET: ${SEARXNG_SECRET:-eai-agentplatform-searxng-change-me} SEARXNG_VALKEY_URL: valkey://127.0.0.1:6379/0 SEARXNG_PORT: ${SEARXNG_PORT:-18080} UWSGI_THREADS: 4 volumes: - ./searxng:/etc/searxng:ro - searxng-cache:/var/cache/searxng depends_on: - searxng-valkey volumes: searxng-cache: searxng-valkey-data: