Skip to content

Latest commit

 

History

History
86 lines (62 loc) · 2.03 KB

File metadata and controls

86 lines (62 loc) · 2.03 KB

快速开始 / Quick Start

中文

1. 前置条件

  • Docker 与 Docker Compose;
  • 一个已运行、支持 JSON 输出的 SearXNG;
  • SearXNG 与本服务可以通过同一 Docker 网络或可路由地址通信。

2. 配置并启动

git clone https://github.com/reallhw/web-extract-api.git
cd web-extract-api

cp .env.example .env
sed -i "s/REPLACE_WITH_A_NEW_64_HEX_SECRET/$(openssl rand -hex 32)/" .env

docker network create hermes-web 2>/dev/null || true
docker network connect hermes-web searxng 2>/dev/null || true
docker compose config
docker compose build
docker compose up -d
docker compose ps

如果你的网络名或 SearXNG 地址不同,修改 .env

WEB_EXTRACT_NETWORK=hermes-web
SEARXNG_URL=http://searxng:8080

3. 验证

export WEB_EXTRACT_API_URL=http://127.0.0.1:28900
export WEB_EXTRACT_API_KEY="$(sed -n 's/^WEB_EXTRACT_API_KEY=//p' .env)"
bash scripts/verify.sh

局域网访问必须显式设置 WEB_EXTRACT_BIND_IP,并配合防火墙和鉴权。

English

1. Requirements

  • Docker and Docker Compose;
  • a running SearXNG instance with JSON output enabled;
  • network connectivity between SearXNG and this service.

2. Configure and start

git clone https://github.com/reallhw/web-extract-api.git
cd web-extract-api

cp .env.example .env
sed -i "s/REPLACE_WITH_A_NEW_64_HEX_SECRET/$(openssl rand -hex 32)/" .env

docker network create hermes-web 2>/dev/null || true
docker network connect hermes-web searxng 2>/dev/null || true
docker compose config
docker compose build
docker compose up -d
docker compose ps

Adjust these values when your network or SearXNG endpoint differs:

WEB_EXTRACT_NETWORK=hermes-web
SEARXNG_URL=http://searxng:8080

3. Verify

export WEB_EXTRACT_API_URL=http://127.0.0.1:28900
export WEB_EXTRACT_API_KEY="$(sed -n 's/^WEB_EXTRACT_API_KEY=//p' .env)"
bash scripts/verify.sh

LAN exposure must be explicitly enabled with WEB_EXTRACT_BIND_IP and should be protected by authentication and firewall rules.