docker:部署自己的搜索引擎searxng.md 1.6 KB


title: Docker:部署自己的搜索引擎SearXNG tags: [] id: '2177' categories:

  • - 开源 comments: false date: 2022-07-31 03:30:58 ---

咕咕鸽最近又更新了一期搭建SearXNG的教程,咱也跟着咕咕鸽的教程折腾一下

version: '3.7'
services:
  redis:
    container_name: redis_searxng
    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: searxng
    image: searxng/searxng:latest
    networks:
      - searxng
    ports:
      - "8180:8080"   # 这个冒号左边的端口可以更改,右边的不要改
    volumes:
      - ./searxng:/etc/searxng:rw
    environment:
      - SEARXNG_HOSTNAME=s.limour.top
      - SEARXNG_BASE_URL=https://s.limour.top/
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
      - DAC_OVERRIDE
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"
networks:
  searxng:
    ipam:
      driver: default
  • mkdir -p ~/searxng && cd ~/searxng
  • nano docker-compose.yml
  • sudo docker-compose up -d
  • sudo docker-compose logs
  • NPM面板反代8180端口,并设置域名解析。
  • sudo docker-compose down
  • sed -i "sultrasecretkey$(openssl rand -hex 32)g" searxng/settings.yml # 生成一个密钥
  • sudo docker-compose up -d