项目需要搭建es环境,踩了一些坑,记录下
首选还是通过docker搭建,而通过docker最佳的部署方式就是docker compose
1.docker-compose.yml
version: "3.1" # 服务配置 services: elasticsearch: container_name: es01 image: elasticsearch:8.12.2 restart: unless-stopped environment: - "ES_JAVA_OPTS=-Xms1024m -Xmx1024m" - "TZ=Asia/Shanghai" - "discovery.type=single-node" - "ELASTIC_PASSWORD=sujiaoke@0423" ports: - "9200:9200" - "9300:9300" volumes: # - ./config:/usr/share/elasticsearch/config - ./data:/usr/share/elasticsearch/data - ./plugins:/usr/share/elasticsearch/plugins networks: - elastic_net kibana: container_name: kibana01 image: kibana:8.12.2 restart: unless-stopped environment: - "TZ=Asia/Shanghai" - "I18N_LOCALE=zh-CN" - "ELASTICSEARCH_HOSTS=http://elasticsearch:9200" - "ELASTICSEARCH_USERNAME=jsti" - "ELASTICSEARCH_PASSWORD=jsti@123" ports: - "5601:5601" #volumes: #- ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml networks: - elastic_net depends_on: - elasticsearch # 网络配置 networks: elastic_net: driver: bridge
标签:compose,share,kibana,elasticsearch,Kibana,ElasticSearch,docker,usr From: https://www.cnblogs.com/allay/p/18153544