A. 最终效果
B. 配置文件
version: "3"
services:
wiki:
image: ghcr.io/requarks/wiki:2
container_name: wikijs
ports:
- "3000:3000"
volumes:
- /home/lgk/Projects/WikiJS/config:/config
environment:
- DB_TYPE=postgres
- DB_HOST=database
- DB_PORT=5432
- DB_USER=wikijs
- DB_PASS=wikijsrocks
- DB_NAME=wiki
- SEARCH_TYPE=elasticsearch
- SEARCH_HOST=http://elasticsearch:9200
- SEARCH_INDEX_NAME=wiki
depends_on:
- database
- elasticsearch
database:
image: postgres:15-alpine
container_name: wikijs_postgres
environment:
POSTGRES_DB: wiki
POSTGRES_PASSWORD: wikijsrocks
POSTGRES_USER: wikijs
volumes:
- /home/lgk/Projects/WikiJS/data:/var/lib/postgresql/data
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.13
container_name: elasticsearch
environment:
- discovery.type=single-node
- bootstrap.memory_lock=false
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
volumes:
- /home/lgk/Projects/WikiJS/esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
C. 中文搜索设置
http://elasticsearch:9200