fix: 新增端口指定

This commit is contained in:
Tim
2025-09-28 19:13:17 +08:00
parent c0ca615439
commit 04616a30f3
2 changed files with 8 additions and 3 deletions

View File

@@ -1,6 +1,11 @@
# 前端访问端口
SERVER_PORT=8080
# OpenSearch 配置
OPENSEARCH_PORT=9200
OPENSEARCH_METRICS_PORT=9600
OPENSEARCH_DASHBOARDS_PORT=5601
# MySQL 配置
MYSQL_ROOT_PASSWORD=toor

View File

@@ -36,8 +36,8 @@ services:
- ./data:/usr/share/opensearch/data
- ./snapshots:/snapshots
ports:
- "9200:9200"
- "9600:9600"
- "${OPENSEARCH_PORT:-9200}:9200"
- "${OPENSEARCH_METRICS_PORT:-9600}:9600"
restart: unless-stopped
dashboards:
@@ -47,7 +47,7 @@ services:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
ports:
- "5601:5601"
- "${OPENSEARCH_DASHBOARDS_PORT:-5601}:5601"
depends_on:
- opensearch
restart: unless-stopped