docker-compose部署ELK+skywalking

docker-compose部署ELK+skywalking

使用docker-compose部署elk十分方便简洁,适合单机部署,提供大家学习、开发使用。

docker-compose文件:

version: '3'
services:
  elasticsearch:
    image: elasticsearch:7.7.0
    container_name: elk_elasticsearch
    restart: always
    environment:
      - "cluster.name=elasticsearch" 
      - "discovery.type=single-node" 
      - "ES_JAVA_OPTS=-Xms512m -Xmx1024m" 
    volumes:
      - ./elasticsearch/plugins:/usr/share/elasticsearch/plugins
      - ./elasticsearch/data:/usr/share/elasticsearch/data
    ports:
      - 9200:9200

  kibana:
    image: kibana:7.7.0
    container_name: elk_kibana
    restart: always
    depends_on:
      - elasticsearch
    environment:
      - ELASTICSEARCH_URL=http://elasticsearch:9200
    ports:
      - 5601:5601

  logstash:
    image: logstash:7.7.0
    container_name: elk_logstash
    restart: always
    volumes:
      - ./logstash/logstash-springboot.conf:/usr/share/logstash/pipeline/logstash.conf 
    depends_on:
      - elasticsearch
    links:
      - elasticsearch:es
    ports:
      - 4560:4560

  oap:
    image: apache/skywalking-oap-server
    container_name: skywalking-oap
    depends_on:
        - elasticsearch
    links:
        - elasticsearch
    restart: always
    ports:
        - 11800:11800
        - 12800:12800
    environment:
        TZ: Asia/Shanghai

  ui:
    image: apache/skywalking-ui
    container_name: skywalking-ui
    depends_on:
        - oap
    links:
        - oap
    restart: always
    ports:
        - 8081:8080
    environment:
        collector.ribbon.listOfServers: oap:12800
        security.user.admin.password: 123456

新建挂载目录:

mkdir elasticsearch
mkdir logstash

启动docker-compose:

docker-complse build
docker-complose up -d
Creating network "elk-compose_default" with the default driver
Creating elk_elasticsearch ... done
Creating elk_logstash      ... done
Creating skywalking-oap    ... done
Creating elk_kibana        ... done
Creating skywalking-ui     ... done

你可能感兴趣的:(docker,elasticsearch,es,docker,elk)