searxng-docker,使用 Docker 创建SearXNG 实例。
部署
1 2 3 4
| git clone https://github.com/searxng/searxng-docker.git cd searxng-docker mv docker-compose.yaml docker-compose.yaml.bak nano docker-compose.yaml
|
docker-compose.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| version: '3.7' services: redis: container_name: redis 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_BASE_URL=https://${SEARXNG_HOSTNAME:-https://你的域名}/ 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
|
sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml
docker compose up -d
从ip:8180访问

