feat: 新增 Elasticsearch (#672)

This commit is contained in:
wanghe 2023-12-07 15:16:21 +08:00 committed by GitHub
parent 38bed80df0
commit df69783338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 218 additions and 0 deletions

View File

@ -0,0 +1,38 @@
additionalProperties:
formFields:
- default: 9200
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: HTTP Port
labelZh: HTTP端口
required: true
rule: paramPort
type: number
- default: "true"
edit: true
envKey: ELASTIC_SECURITY
labelEn: Password Verification
labelZh: 开启密码验证
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "Elastic"
edit: true
envKey: ELASTIC_PASSWORD
labelEn: Password
labelZh: 密码
random: true
required: true
rule: paramComplexity
type: password
- default: "ES_JAVA_OPTS=-Xlog:disable -Xlog:gc=debug:stderr -Xms512m -Xmx512m"
edit: true
envKey: P_ES_JAVA_OPTS
labelEn: ES JAVA OPTS
labelZh: ES JAVA OPTS
required: true
type: text

View File

@ -0,0 +1,6 @@
cluster.name: "docker-cluster"
network.host: 0.0.0.0
path.repo: ["/usr/share/elasticsearch/backup"]
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

View File

@ -0,0 +1,31 @@
version: '3'
services:
elasticsearch:
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:9200"
volumes:
- "./data/data:/usr/share/elasticsearch/data"
- "./data/backup:/usr/share/elasticsearch/backup"
- "./data/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
image: elasticsearch:7.17.15
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- xpack.security.enabled=${ELASTIC_SECURITY}
- ${P_ES_JAVA_OPTS}
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data

View File

@ -0,0 +1,38 @@
additionalProperties:
formFields:
- default: 9200
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: HTTP Port
labelZh: HTTP端口
required: true
rule: paramPort
type: number
- default: "true"
edit: true
envKey: ELASTIC_SECURITY
labelEn: Password Verification
labelZh: 开启密码验证
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "Elastic"
edit: true
envKey: ELASTIC_PASSWORD
labelEn: Password
labelZh: 密码
random: true
required: true
rule: paramComplexity
type: password
- default: "ES_JAVA_OPTS=-Xlog:disable -Xlog:gc=debug:stderr -Xms512m -Xmx512m"
edit: true
envKey: P_ES_JAVA_OPTS
labelEn: ES JAVA OPTS
labelZh: ES JAVA OPTS
required: true
type: text

View File

@ -0,0 +1,6 @@
cluster.name: "docker-cluster"
network.host: 0.0.0.0
path.repo: ["/usr/share/elasticsearch/backup"]
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: X-Requested-With,Content-Type,Content-Length,Authorization

View File

@ -0,0 +1,31 @@
version: '3'
services:
elasticsearch:
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- "${PANEL_APP_PORT_HTTP}:9200"
volumes:
- "./data/data:/usr/share/elasticsearch/data"
- "./data/backup:/usr/share/elasticsearch/backup"
- "./data/conf/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
image: elasticsearch:8.11.1
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
environment:
- discovery.type=single-node
- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- xpack.security.enabled=${ELASTIC_SECURITY}
- ${P_ES_JAVA_OPTS}
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data

View File

@ -0,0 +1,42 @@
# 默认账户
- 默认账户: elastic
# Elasticsearch
**Elasticsearch** 是一种分布式 RESTful 搜索引擎,针对生产规模工作负载的速度和相关性进行了优化。您可以使用 Elasticsearch 对海量数据集执行实时搜索应用程序。
# 主要功能:
## 全文搜索
- 支持全文搜索和查询,能够快速地在大规模数据集中找到相关的文档。
- 采用分词、词干化等技术,提供高效的文本搜索。
## 分布式性能
- 能够水平扩展,轻松地将数据分布到多个节点,实现高性能的数据存储和检索。
## 实时数据
- 支持实时数据的索引和搜索,能够快速响应新数据的添加、更新和删除操作。
## 多种数据类型支持
- 可以处理结构化数据、半结构化数据和非结构化数据,如文本、地理空间数据等。
## 强大的聚合分析
- 提供丰富的聚合功能,能够对数据进行各种汇总、统计和分析操作。
## RESTful API
- 使用简单的HTTP请求与Elasticsearch交互执行索引、搜索、管理等操作。
## 灵活的插件和生态系统
- 具有丰富的插件生态系统,可以扩展其功能,满足不同场景下的需求。
## 可视化工具
- 有多种可视化工具和仪表盘如Kibana用于展示和分析Elasticsearch中的数据。

View File

@ -0,0 +1,20 @@
name: Elasticsearch
tags:
- 数据库
title: Elasticsearch
type: 数据库
description: 免费开放、分布式、RESTful 搜索引擎
additionalProperties:
key: elasticsearch
name: Elasticsearch
tags:
- Database
shortDescZh: 免费开放、分布式、RESTful 搜索引擎
shortDescEn: Free and Open, Distributed, RESTful Search Engine
type: runtime
crossVersionUpdate: false
limit: 0
recommend: 0
website: https://www.elastic.co
github: https://github.com/elastic/elasticsearch
document: https://www.elastic.co/guide/en/elasticsearch/reference/8.11/elasticsearch-intro.html

BIN
apps/elasticsearch/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB