27 lines
794 B
YAML
27 lines
794 B
YAML
version: '3.9'
|
|
|
|
services:
|
|
elasticsearch:
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
|
|
restart: always
|
|
hostname: kite.elasticsearch
|
|
container_name: elasticsearch
|
|
volumes:
|
|
- ./data:/usr/share/elasticsearch/data
|
|
- ./plugins:/usr/share/elasticsearch/plugins
|
|
- ./config/elasticsearch.yml:/config/elasticsearch.yml
|
|
environment:
|
|
- "ES_JAVA_OPTS=-Xms64m -Xmx512m" # jvm
|
|
- discovery.type=single-node # 单节点
|
|
ports:
|
|
- '9200:9200' # 集群通信端口
|
|
- '9300:9300' # http业务通信端口
|
|
privileged: true # 环境变量
|
|
|
|
kibana:
|
|
image: docker.elastic.co/kibana/kibana:8.5.2
|
|
environment:
|
|
ELASTICSEARCH_HOSTS: '["http://es01:9200","http://es02:9200","http://es03:9200"]'
|
|
|
|
|