• docker-compose 一键安装redis mysql rabbitmq elasticsearch kibana logstash


    创建docker-compose.yml文件

    version: '3'
    services:
      mysql-server:
        image: mysql:5.7
        container_name: mysql-server
        restart: always
        ports:
          - 3306:3306
        environment:
          MYSQL_ROOT_PASSWORD: 123456
      redis-server:
        image: redis:latest
        container_name: redis-server
        command: redis-server --requirepass 123456
        restart: always
        ports:
          - 6379:6379
      rabbitmq-server:
        image: rabbitmq:management
        container_name: rabbitmq-server
        restart: always
        ports:
          - 5672:5672
          - 15672:15672
      elasticsearch:
        image: es-ik:6.6.2
        container_name: elasticsearch
        restart: always
        environment:
          - "cluster.name=elasticsearch"
          - "discovery.type=single-node"
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ports:
        - 9200:9200
        - 9300:9300
      kibana:
        image: docker.elastic.co/kibana/kibana:6.6.2
        container_name: kibana
        environment:
          - SERVER_NAME=kibana
          - ELASTICSEARCH_URL=http://elasticsearch:9200
          - XPACK_MONITORING_ENABLED=true
        ports:
          - 5601:5601
        depends_on:
          - elasticsearch
      logstash:
        image: logstash:6.6.2
        container_name: logstash
        volumes:
          - ~/docker/mydata/logstash/logstash.conf:/usr/share/logstash/pipeline/logstash.conf
        depends_on:
          - elasticsearch
        links:
          - elasticsearch:es
        ports:
          - 4560:4560
    

    启动容器:
    docker-compose up -d

    logstash.conf

    input {
      tcp {
        mode => "server"
        host => "0.0.0.0"
        port => 4560
        codec => json_lines
        type => "business"
      }
    }
    output {
      elasticsearch {
        hosts => ["es:9200"]
        action => "index"
        codec => json
        index => "%{type}-%{+YYYY.MM.dd}"
        template_name => "business"
      }
    }
    

    说明!!! es-ik:6.6.2是自己创建的镜像,步骤: 创建带ik插件镜像

  • 相关阅读:
    6-rocketmq-springboot整合
    5-rocketmq-事务消息
    3-rocketmq-支持的消息种类
    2-rocketmq-消息发送和接收
    1-rocketmq简介-部署
    详解unix5种IO模型
    大纲
    马哥博客作业第二十一周
    马哥博客作业第二十周
    马哥博客作业第十九周
  • 原文地址:https://www.cnblogs.com/linyufeng/p/13047854.html
Copyright © 2020-2023  润新知