diff --git a/elastic-elasticsearch/9.0.1/data.yml b/elastic-elasticsearch/9.0.1/data.yml new file mode 100644 index 000000000..b627b241e --- /dev/null +++ b/elastic-elasticsearch/9.0.1/data.yml @@ -0,0 +1,60 @@ +additionalProperties: + formFields: + - default: "/home/elasticsearch" + edit: true + envKey: ELASTICSEARCH_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 9200 + edit: true + envKey: PANEL_APP_PORT_HTTPS + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: 9300 + edit: true + envKey: PANEL_APP_PORT_CLUSTER + labelZh: 集群端口 + labelEn: Cluster port + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: ELASTIC_PASSWORD + labelZh: Elasticsearch 密码 (elastic) + labelEn: Elasticsearch password (elastic) + required: true + type: password + - default: "" + edit: true + envKey: KIBANA_PASSWORD + labelZh: Kibana 密码 (kibana_system) + labelEn: Kibana password (kibana_system) + required: false + type: password + - default: "elasticsearch" + edit: true + envKey: ES_SETTING_CLUSTER_NAME + labelZh: 集群名称 + labelEn: Cluster name + required: true + type: text + - default: "es-node" + edit: true + envKey: ES_SETTING_NODE_NAME + labelZh: 节点名称 + labelEn: Node name + required: true + type: text + - default: "-Xms1g -Xmx1g" + edit: true + envKey: ES_JAVA_OPTS + labelZh: Java 启动参数 (可选) + labelEn: Java startup parameters (optional) + required: false + type: text diff --git a/elastic-elasticsearch/9.0.1/docker-compose.yml b/elastic-elasticsearch/9.0.1/docker-compose.yml new file mode 100644 index 000000000..ae4fd43af --- /dev/null +++ b/elastic-elasticsearch/9.0.1/docker-compose.yml @@ -0,0 +1,35 @@ +networks: + 1panel-network: + external: true + +services: + elasticsearch: + image: elasticsearch:9.0.1 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + tty: true + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + ports: + - ${PANEL_APP_PORT_HTTPS}:9200 + - ${PANEL_APP_PORT_CLUSTER}:9300 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${ELASTICSEARCH_ROOT_PATH}/data:/usr/share/elasticsearch/data + - ${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 + - ES_SETTING_PATH_REPO=/usr/share/elasticsearch/backup diff --git a/elastic-elasticsearch/9.0.1/envs/default.env b/elastic-elasticsearch/9.0.1/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/elastic-elasticsearch/9.0.1/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/elastic-elasticsearch/9.0.1/envs/global.env b/elastic-elasticsearch/9.0.1/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/elastic-elasticsearch/9.0.1/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/elastic-elasticsearch/9.0.1/scripts/init.sh b/elastic-elasticsearch/9.0.1/scripts/init.sh new file mode 100644 index 000000000..33a7b7f49 --- /dev/null +++ b/elastic-elasticsearch/9.0.1/scripts/init.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + mkdir -p $ELASTICSEARCH_ROOT_PATH + mkdir -p "$ELASTICSEARCH_ROOT_PATH/data" + mkdir -p "$ELASTICSEARCH_ROOT_PATH/backup" + mkdir -p "$ELASTICSEARCH_ROOT_PATH/plugins" + + chown -R 1000:1000 $ELASTICSEARCH_ROOT_PATH + + echo "Check Finish." +else + echo "Error: .env file not found." +fi diff --git a/elastic-elasticsearch/9.0.1/scripts/uninstall.sh b/elastic-elasticsearch/9.0.1/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/elastic-elasticsearch/9.0.1/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/elastic-elasticsearch/9.0.1/scripts/upgrade.sh b/elastic-elasticsearch/9.0.1/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/elastic-elasticsearch/9.0.1/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi