feat: add mcp-servers/**
This commit is contained in:
24
src/searxng/.env.example
Normal file
24
src/searxng/.env.example
Normal file
@@ -0,0 +1,24 @@
|
||||
# SearXNG version
|
||||
SEARXNG_VERSION=2025.1.20-1ce14ef99
|
||||
|
||||
# SearXNG port (default: 8080)
|
||||
SEARXNG_PORT_OVERRIDE=8080
|
||||
|
||||
# SearXNG hostname (used for Caddy reverse proxy)
|
||||
SEARXNG_HOSTNAME=http://localhost
|
||||
|
||||
# Let's Encrypt email (for HTTPS certificates, set to "internal" for self-signed)
|
||||
LETSENCRYPT_EMAIL=internal
|
||||
|
||||
# uWSGI worker processes and threads
|
||||
SEARXNG_UWSGI_WORKERS=4
|
||||
SEARXNG_UWSGI_THREADS=4
|
||||
|
||||
# Valkey (Redis) version
|
||||
VALKEY_VERSION=8-alpine
|
||||
|
||||
# Caddy version
|
||||
CADDY_VERSION=2-alpine
|
||||
|
||||
# Timezone
|
||||
TZ=UTC
|
||||
75
src/searxng/README.md
Normal file
75
src/searxng/README.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# SearXNG
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
This service deploys SearXNG, a privacy-respecting metasearch engine that aggregates results from multiple search engines without tracking users.
|
||||
|
||||
## Services
|
||||
|
||||
- `searxng`: The SearXNG metasearch engine
|
||||
- `redis`: Valkey (Redis-compatible) for caching search results
|
||||
- `caddy`: Reverse proxy and HTTPS termination (uses host network mode)
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable Name | Description | Default Value |
|
||||
| --------------------- | ------------------------------------------------------------------------------ | --------------------- |
|
||||
| SEARXNG_VERSION | SearXNG image version | `2025.1.20-1ce14ef99` |
|
||||
| SEARXNG_PORT_OVERRIDE | Host port mapping for SearXNG (maps to port 8080 in container) | 8080 |
|
||||
| SEARXNG_HOSTNAME | Hostname for Caddy reverse proxy | `http://localhost` |
|
||||
| LETSENCRYPT_EMAIL | Email for Let's Encrypt HTTPS certificates (set to "internal" for self-signed) | `internal` |
|
||||
| SEARXNG_UWSGI_WORKERS | Number of uWSGI worker processes | 4 |
|
||||
| SEARXNG_UWSGI_THREADS | Number of uWSGI threads per worker | 4 |
|
||||
| VALKEY_VERSION | Valkey (Redis) image version | `8-alpine` |
|
||||
| CADDY_VERSION | Caddy reverse proxy version | `2-alpine` |
|
||||
| TZ | Timezone setting | `UTC` |
|
||||
|
||||
Please modify the `.env` file as needed for your use case.
|
||||
|
||||
## Volumes
|
||||
|
||||
- `caddy-data`: Caddy data storage (certificates, etc.)
|
||||
- `caddy-config`: Caddy configuration
|
||||
- `valkey-data`: Valkey data persistence
|
||||
- `./searxng`: SearXNG configuration directory (mounted to `/etc/searxng`)
|
||||
|
||||
## Ports
|
||||
|
||||
- `8080`: SearXNG Web UI (via Caddy reverse proxy when using host network mode)
|
||||
|
||||
## Configuration
|
||||
|
||||
### SearXNG Settings
|
||||
|
||||
Edit configuration files in the `./searxng` directory to customize:
|
||||
|
||||
- Search engines to use
|
||||
- UI theme and appearance
|
||||
- Privacy settings
|
||||
- Result filtering
|
||||
|
||||
### HTTPS with Let's Encrypt
|
||||
|
||||
To enable HTTPS with Let's Encrypt certificates:
|
||||
|
||||
1. Set `LETSENCRYPT_EMAIL` to your email address in `.env`
|
||||
2. Set `SEARXNG_HOSTNAME` to your domain name (e.g., `https://search.example.com`)
|
||||
3. Ensure ports 80 and 443 are accessible from the internet
|
||||
4. Create or update the `Caddyfile` with your domain configuration
|
||||
|
||||
### Self-Signed Certificates
|
||||
|
||||
By default (`LETSENCRYPT_EMAIL=internal`), Caddy will use self-signed certificates for HTTPS.
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
1. Start the services
|
||||
2. Access SearXNG at `http://localhost:8080` (or your configured hostname)
|
||||
3. Configure your browser to use SearXNG as the default search engine (optional)
|
||||
4. Customize settings through the web interface
|
||||
|
||||
## Additional Information
|
||||
|
||||
- Official Documentation: <https://docs.searxng.org/>
|
||||
- GitHub Repository: <https://github.com/searxng/searxng>
|
||||
- Original Project: <https://github.com/searxng/searxng-docker>
|
||||
75
src/searxng/README.zh.md
Normal file
75
src/searxng/README.zh.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# SearXNG
|
||||
|
||||
[English](./README.md) | [中文](./README.zh.md)
|
||||
|
||||
此服务部署 SearXNG,一个尊重隐私的元搜索引擎,它聚合多个搜索引擎的结果而不跟踪用户。
|
||||
|
||||
## 服务
|
||||
|
||||
- `searxng`:SearXNG 元搜索引擎
|
||||
- `redis`:Valkey(Redis 兼容)用于缓存搜索结果
|
||||
- `caddy`:反向代理和 HTTPS 终止(使用主机网络模式)
|
||||
|
||||
## 环境变量
|
||||
|
||||
| 变量名 | 说明 | 默认值 |
|
||||
| --------------------- | ------------------------------------------------------------------ | --------------------- |
|
||||
| SEARXNG_VERSION | SearXNG 镜像版本 | `2025.1.20-1ce14ef99` |
|
||||
| SEARXNG_PORT_OVERRIDE | SearXNG 主机端口映射(映射到容器内端口 8080) | 8080 |
|
||||
| SEARXNG_HOSTNAME | Caddy 反向代理的主机名 | `http://localhost` |
|
||||
| LETSENCRYPT_EMAIL | Let's Encrypt HTTPS 证书的邮箱(设置为 "internal" 使用自签名证书) | `internal` |
|
||||
| SEARXNG_UWSGI_WORKERS | uWSGI 工作进程数 | 4 |
|
||||
| SEARXNG_UWSGI_THREADS | 每个 uWSGI 工作进程的线程数 | 4 |
|
||||
| VALKEY_VERSION | Valkey(Redis)镜像版本 | `8-alpine` |
|
||||
| CADDY_VERSION | Caddy 反向代理版本 | `2-alpine` |
|
||||
| TZ | 时区设置 | `UTC` |
|
||||
|
||||
请根据实际需求修改 `.env` 文件。
|
||||
|
||||
## 卷
|
||||
|
||||
- `caddy-data`:Caddy 数据存储(证书等)
|
||||
- `caddy-config`:Caddy 配置
|
||||
- `valkey-data`:Valkey 数据持久化
|
||||
- `./searxng`:SearXNG 配置目录(挂载到 `/etc/searxng`)
|
||||
|
||||
## 端口
|
||||
|
||||
- `8080`:SearXNG Web UI(使用主机网络模式时通过 Caddy 反向代理)
|
||||
|
||||
## 配置
|
||||
|
||||
### SearXNG 设置
|
||||
|
||||
编辑 `./searxng` 目录中的配置文件以自定义:
|
||||
|
||||
- 要使用的搜索引擎
|
||||
- UI 主题和外观
|
||||
- 隐私设置
|
||||
- 结果过滤
|
||||
|
||||
### 使用 Let's Encrypt 启用 HTTPS
|
||||
|
||||
要启用 Let's Encrypt 证书的 HTTPS:
|
||||
|
||||
1. 在 `.env` 中将 `LETSENCRYPT_EMAIL` 设置为你的邮箱地址
|
||||
2. 将 `SEARXNG_HOSTNAME` 设置为你的域名(例如,`https://search.example.com`)
|
||||
3. 确保端口 80 和 443 可从互联网访问
|
||||
4. 创建或更新 `Caddyfile` 以包含你的域名配置
|
||||
|
||||
### 自签名证书
|
||||
|
||||
默认情况下(`LETSENCRYPT_EMAIL=internal`),Caddy 将使用自签名证书进行 HTTPS。
|
||||
|
||||
## 首次设置
|
||||
|
||||
1. 启动服务
|
||||
2. 访问 SearXNG:`http://localhost:8080`(或你配置的主机名)
|
||||
3. 将浏览器配置为使用 SearXNG 作为默认搜索引擎(可选)
|
||||
4. 通过 Web 界面自定义设置
|
||||
|
||||
## 附加信息
|
||||
|
||||
- 官方文档:<https://docs.searxng.org/>
|
||||
- GitHub 仓库:<https://github.com/searxng/searxng>
|
||||
- 原始项目:<https://github.com/searxng/searxng-docker>
|
||||
115
src/searxng/docker-compose.yaml
Normal file
115
src/searxng/docker-compose.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
# https://github.com/searxng/searxng-docker/blob/master/docker-compose.yaml
|
||||
x-default: &default
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: "3"
|
||||
|
||||
services:
|
||||
caddy:
|
||||
<<: *default
|
||||
image: docker.io/library/caddy:${CADDY_VERSION:-2-alpine}
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
environment:
|
||||
- SEARXNG_HOSTNAME=${SEARXNG_HOSTNAME:-http://localhost}
|
||||
- SEARXNG_TLS=${LETSENCRYPT_EMAIL:-internal}
|
||||
- TZ=${TZ:-UTC}
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- NET_BIND_SERVICE
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:2019/config/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.10'
|
||||
memory: 64M
|
||||
|
||||
redis:
|
||||
<<: *default
|
||||
image: docker.io/valkey/valkey:${VALKEY_VERSION:-8-alpine}
|
||||
command: valkey-server --save 30 1 --loglevel warning
|
||||
networks:
|
||||
- searxng
|
||||
volumes:
|
||||
- valkey-data:/data
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- SETGID
|
||||
- SETUID
|
||||
- DAC_OVERRIDE
|
||||
healthcheck:
|
||||
test: ["CMD", "valkey-cli", "ping"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.50'
|
||||
memory: 256M
|
||||
reservations:
|
||||
cpus: '0.10'
|
||||
memory: 64M
|
||||
|
||||
searxng:
|
||||
<<: *default
|
||||
image: docker.io/searxng/searxng:${SEARXNG_VERSION:-2025.1.20-1ce14ef99}
|
||||
networks:
|
||||
- searxng
|
||||
ports:
|
||||
- "${SEARXNG_PORT_OVERRIDE:-8080}:8080"
|
||||
volumes:
|
||||
- ./searxng:/etc/searxng:rw
|
||||
environment:
|
||||
- SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/
|
||||
- UWSGI_WORKERS=${SEARXNG_UWSGI_WORKERS:-4}
|
||||
- UWSGI_THREADS=${SEARXNG_UWSGI_THREADS:-4}
|
||||
- TZ=${TZ:-UTC}
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- CHOWN
|
||||
- SETGID
|
||||
- SETUID
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.00'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 256M
|
||||
|
||||
networks:
|
||||
searxng:
|
||||
|
||||
volumes:
|
||||
caddy-data:
|
||||
caddy-config:
|
||||
valkey-data:
|
||||
Reference in New Issue
Block a user