docker-es-kibana/README.md
2024-07-15 14:44:21 +08:00

56 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker-es-kibana
可以一键部署启动的容器化elasticsearch和kibana服务
## 说明
由于网络原因本项目没有使用elastic官方镜像源而是引用quay.io源目前只支持`8.14.2`版本,镜像内容与官方完全一致,未做任何修改。
## 用法
根据.env.example文件创建.env文件
```sh
cp .env.example .env
```
在.env文件中配置环境变量
```ini
# Password for the 'elastic' user (at least 6 characters)
ELASTIC_PASSWORD=password-for-elastic
# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=password-for-kibana_system
# Version of Elastic products
STACK_VERSION=8.14.2
# Set the cluster name
CLUSTER_NAME=docker-cluster
# Set to 'basic' or 'trial' to automatically start the 30-day trial
LICENSE=basic
#LICENSE=trial
# Port to expose Elasticsearch HTTP API to the host
ES_PORT=9200
#ES_PORT=127.0.0.1:9200
# Port to expose Kibana to the host
KIBANA_PORT=5601
#KIBANA_PORT=80
# Increase or decrease based on the available host memory (in bytes)
MEM_LIMIT=1073741824
# Project namespace (defaults to the current folder name if not set)
COMPOSE_PROJECT_NAME=elastic
```
启动容器
```sh
docker compose up -d
```