docker-compose 配置 es kibana

直接上代码

elasticsearch.yml

1
2
3
4
5
6
http:
 host: 0.0.0.0
xpack.security.enabled: false
xpack.security.enrollment.enabled: true
xpack.security.http.ssl:
 enabled: false

kibana.yml

1
2
3
4
5
6
7
8
9
10
11
12
server.name: kibana
# kibana的主机地址 0.0.0.0可表示监听所有IP
server.host: "0.0.0.0"
#
# 这边设置自己es的地址,
elasticsearch.hosts: [ "http://elasticsearch:9200" ]
elasticsearch.username: 'kibana'
elasticsearch.password: '123456'
# # 显示登陆页面
xpack.monitoring.ui.container.elasticsearch.enabled: true
# 开启中文模式
i18n.locale: "zh-CN"

 

安装docker-compose.yml文件新建本地目录

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
version: '3'
networks:
  es:
services:
  elasticsearch:
    image: elasticsearch:8.6.0
    container_name: elasticsearch
    restart: always
    environment:
      - discovery.type=single-node
    volumes:
      - ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
      - ./data:/usr/share/elasticsearch/data
      - ./plugins:/usr/share/elasticsearch/plugins
      - ./logs:/usr/share/elasticsearch/logs
    ports:
      - "9200:9200"
    networks:
      - "es"
    privileged: true
 
  kibana:
    image: kibana:8.6.0
    container_name: kibana
    restart: always
    networks:
      - "es"
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml
    ports:
      - "5601:5601"
    privileged: trueq 

 启动命令

 

 页面效果查看

   localhost:9200

 

 

   localhost:5601

 

 

  

posted @   专心写代码  阅读(316)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
点击右上角即可分享
微信分享提示