feat: 新增docker部署相关信息

This commit is contained in:
Tim
2025-09-28 18:05:49 +08:00
parent b0597d34b6
commit c0ca615439
2 changed files with 47 additions and 0 deletions

9
docker/DockerFile Normal file
View File

@@ -0,0 +1,9 @@
# opensearch
FROM opensearchproject/opensearch:3.0.0
RUN /usr/share/opensearch/bin/opensearch-plugin install -b analysis-icu
RUN /usr/share/opensearch/bin/opensearch-plugin install -b \
https://github.com/aparo/opensearch-analysis-pinyin/releases/download/3.0.0/opensearch-analysis-pinyin.zip
# ...

View File

@@ -14,6 +14,44 @@ services:
- ../backend/src/main/resources/db/init:/docker-entrypoint-initdb.d
networks:
- openisle-network
# OpenSearch Service
opensearch:
build:
context: .
dockerfile: Dockerfile
container_name: opensearch
environment:
- cluster.name=os-single
- node.name=os-node-1
- discovery.type=single-node
- bootstrap.memory_lock=true
- OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g
- DISABLE_SECURITY_PLUGIN=true
- cluster.blocks.create_index=false
ulimits:
memlock: { soft: -1, hard: -1 }
nofile: { soft: 65536, hard: 65536 }
volumes:
- ./data:/usr/share/opensearch/data
- ./snapshots:/snapshots
ports:
- "9200:9200"
- "9600:9600"
restart: unless-stopped
dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
container_name: os-dashboards
environment:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
ports:
- "5601:5601"
depends_on:
- opensearch
restart: unless-stopped
# Java spring boot service
springboot: