elasticsearch+kibana的DockerCompose
version: '3.8'
services:
elasticsearch:
image: docker.1ms.run/library/elasticsearch:8.19.5
container_name: es01
environment:
- node.name=es01
- cluster.name=es-cluster
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
# 开启认证
- xpack.security.enabled=true
- xpack.security.http.ssl.enabled=false
- ELASTIC_PASSWORD=jiang2004526
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es-data:/usr/share/elasticsearch/data
- /dpanel/compose/es/plugins/ik:/usr/share/elasticsearch/plugins/ik
ports:
- "9200:9200"
- "9300:9300"
kibana:
image: docker.1ms.run/library/kibana:8.19.5
container_name: kibana01
depends_on:
- elasticsearch
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
# 使用正确的环境变量名(关键修复)
- ELASTICSEARCH_SERVICEACCOUNTTOKEN=AAEAAWVsYXN0aWMva2liYW5hL2tpYmFuYS10b2tlbjpMRHJaS3UtMVNiT3VkTW1oUzlWRlZ3
ports:
- "5601:5601"
volumes:
es-data:
elasticsearch+kibana的DockerCompose
/archives/012-elasticsearch-kibanade-dockercompose