This commit is contained in:
2025-11-01 15:24:04 +08:00
parent 68d434e3c4
commit fb590926e7
10 changed files with 365 additions and 13 deletions

View File

@@ -53,7 +53,7 @@ fi
# 创建必要的目录
echo -e "${YELLOW}创建部署目录...${NC}"
mkdir -p ${DEPLOY_DIR}/{data/{upload,temp,unzip,images,reports},logs,nginx}
mkdir -p ${DEPLOY_DIR}/{data/{upload,temp,unzip,images,reports,elasticsearch},logs,nginx}
# 复制配置文件
echo -e "${YELLOW}复制配置文件...${NC}"
@@ -81,6 +81,9 @@ REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=Abc123456
# Elasticsearch配置
ELASTICSEARCH_URIS=http://elasticsearch:9200
# OCR配置
TESS_PATH=/usr/bin/tesseract
@@ -219,6 +222,8 @@ services:
- ./logs:/app/logs
env_file:
- .env
depends_on:
- elasticsearch
networks:
- proxy
restart: unless-stopped
@@ -229,6 +234,28 @@ services:
retries: 3
start_period: 60s
elasticsearch:
image: elasticsearch:7.17.0
container_name: digital-archive-elasticsearch
ports:
- "9200:9200"
- "9300:9300"
environment:
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
volumes:
- ./data/elasticsearch:/usr/share/elasticsearch/data
networks:
- proxy
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
proxy:
external: true