调试 elastic

Signed-off-by: 萌森 <qyg2297248353@163.com>
This commit is contained in:
萌森 2024-07-23 12:54:17 +08:00
parent feca8c24f7
commit a2963ff872
3 changed files with 22 additions and 79 deletions

View File

@ -1,42 +1,17 @@
http.port: 9200
transport.port: 9300
http.host: 0.0.0.0
http.cors.enabled: true
http.cors.allow-origin: "*"
network.host: 0.0.0.0
path:
data: /usr/share/elasticsearch/data
logs: /usr/share/elasticsearch/logs
gateway.recover_after_nodes: 1
cluster.name: ${CLUSTER_NAME}
node.name: ${ES_SETTING_NODE_NAME}
node.master: true
node.ingest: true
node.data: true
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 23-07-2024 03:18:54
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
discovery:
type: single-node
network:
host: 0.0.0.0
http:
host: 0.0.0.0
port: 9200
cors:
enabled: true
allow-origin: "*"
xpack:
security:
enabled: true
autoconfiguration:
enabled: true
enrollment:
enabled: true

View File

@ -9,40 +9,18 @@ additionalProperties:
type: text
- default: 9200
edit: true
envKey: PANEL_APP_PORT_HTTPS
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: 9300
edit: true
envKey: PANEL_APP_PORT_API
labelZh: 通讯端口
labelEn: Communication port
required: true
rule: paramPort
type: number
- default: "elasticsearch-cluster"
edit: true
envKey: CLUSTER_NAME
labelZh: 集群名称
labelEn: Cluster name
required: true
type: text
- default: "elasticsearch-node"
edit: true
envKey: ES_SETTING_NODE_NAME
labelZh: 节点名称
labelEn: Node name
required: true
type: text
- default: ""
edit: true
envKey: ELASTIC_PASSWORD
labelZh: Elasticsearch 密码 (elastic)
labelEn: Elasticsearch password (elastic)
required: false
required: true
type: password
- default: ""
edit: true
@ -51,13 +29,6 @@ additionalProperties:
labelEn: Kibana password (kibana_system)
required: false
type: password
- default: ""
edit: true
envKey: ENROLLMENT_TOKEN
labelZh: 注册令牌 (节点)
labelEn: Enrollment token (node)
required: false
type: text
- default: ""
edit: true
envKey: ES_JAVA_OPTS

View File

@ -22,19 +22,16 @@ services:
soft: 65536
hard: 65536
ports:
- ${PANEL_APP_PORT_HTTPS}:9200
- ${PANEL_APP_PORT_API}:9300
- ${PANEL_APP_PORT_HTTP}:9200
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- ${ELASTICSEARCH_ROOT_PATH}/certs:/usr/share/elasticsearch/config/certs
- ${ELASTICSEARCH_ROOT_PATH}/data:/usr/share/elasticsearch/data
- ${ELASTICSEARCH_ROOT_PATH}/logs:/usr/share/elasticsearch/logs
- ${ELASTICSEARCH_ROOT_PATH}/backup:/usr/share/elasticsearch/backup
- ${ELASTICSEARCH_ROOT_PATH}/plugins:/usr/share/elasticsearch/plugins
environment:
- LICENSE=basic
- ES_SETTING_BOOTSTRAP_MEMORY__LOCK=true
- TAKE_FILE_OWNERSHIP=true
- CLUSTER_INITIAL__MASTER__NODES=${ES_SETTING_NODE_NAME}
- ES_SETTING_BOOTSTRAP_MEMORY__LOCK=true