docker 安装mysql redis kafka

version: 2

services:
  zoo1:
    image: wurstmeister/zookeeper
    restart: always
    hostname: zoo1
    ports:
      - "2181:2181"
    container_name: zookeeper

  kafka1:
    image: wurstmeister/kafka
    restart: always
    ports:
      - "9092:9092"
    environment:
      KAFKA_ADVERTISED_HOST_NAME: localhost
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://10.250.0.66:9092
      KAFKA_ZOOKEEPER_CONNECT: "zoo1:2181"
      KAFKA_BROKER_ID: 1
    depends_on:
      - zoo1
    container_name: kafka
    ports:
        - "9090:9090"
  redis:
    image: redis
    restart: always
    ports:
      - 6379:6379
  
  mysql:
    environment:
        MYSQL_ROOT_PASSWORD: "123456"
        MYSQL_USER: root
        MYSQL_PASS: 123456
    image: "mysql:5.7.18" 
    restart: always
    ports:
        - "3306:3306"
    volumes:
        - "./db:/var/lib/mysql"
        - "./conf/my.cnf:/etc/my.cnf"
        - "./init:/docker-entrypoint-initdb.d/"

 

docker 安装mysql redis kafka

上一篇:关于Fleaphp下SQLite的驱动程序


下一篇:Fleaphp中Sqlite驱动程序中的Bug