相关文章推荐
docker pull typesense/typesense:0.22.1
export TYPESENSE_API_KEY=xyz
mkdir /tmp/typesense-data
docker run -p 8108:8108 -d -v/tmp/typesense-data:/data typesense/typesense:0.22.1 --data-dir /data --api-key=$TYPESENSE_API_KEY

Typesense 健康检查

curl http://localhost:8108/health

2、安装 jq

https://stedolan.github.io/jq/download/

centos:yum install jq

3、typesense - .env

vim /path/typesense/.env

TYPESENSE_API_KEY=xyz
TYPESENSE_HOST=xxx.a1.typesense.net
TYPESENSE_PORT=443
TYPESENSE_PROTOCOL=https

4、typesense - config.json

vim /path/typesense/config.json

config.json 内容格式参考【 https://github.com/algolia/docsearch-configs

5、安装并运行 typesense/docsearch-scraper

docker run -d --env-file=/path/typesense/.env -e "CONFIG=$(cat /path/typesense/config.json | jq -r tostring)" typesense/docsearch-scraper

let the world have no hard-to-write code ^-^
 
推荐文章