version: '3.2'
services:
  mysql5.7:
    image: mysql:5.7
    container_name: zlmy
    environment:
      MYSQL_ROOT_PASSWORD: tc654321
    volumes:
      - $PWD/conf:/etc/mysql/conf.d/
      - $PWD/data:/var/lib/mysql
    ports:
      - "13306:3306"
    restart: always
    command:
      --lower_case_table_names=1
  minio:
    container_name: minio
    image: quay.io/minio/minio:latest
    ports:
      - "9000:9000"
      - "9001:9001"
    restart: always
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: admin
      MINIO_ROOT_PASSWORD: admin123456
    read_only: true
    volumes:
      - ./data:/data
      - ./config:/root/.minio
  xxl-job:
    image: xuxueli/xxl-job-admin:2.3.0
    container_name: xxl-job-admin
    restart: always
    environment:
      PARAMS: "
        --spring.datasource.url=jdbc:mysql://10.10.80.105:13306/zlmy?Unicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
        --spring.datasource.username=root
        --spring.datasource.password=tc654321"
    ports:
      - 8012:8080
    volumes:
      - /data/docker/xxl-job2.3/logs/:/data/applogs/

    # nacos 服务
  nacos:
    image: nacos/nacos-server:v2.1.1
    container_name: nacos-standalone
    restart: always
    volumes:
      # 日志挂载
      - /data/docker/nacos/logs/:/home/nacos/logs
      # 配置文件挂载
      - /home/ZLMY/master/nacos-application.properties:/home/nacos/conf/application.properties
    ports:
      - "8848:8848"
    environment:
      - PREFER_HOST_MODE=ip
      - MODE=standalone
      - SPRING_DATASOURCE_PLATFORM=mysql
      # 内存配置
      - JVM_XMS=256m
      - JVM_MMS=128m

#  seata-server:
#    image: seataio/seata-server:1.3.0
#    container_name: seata-server
#    hostname: seata-server
#    networks:
#      - seata-server
#    ports:
#      - "8091:8091"
#    environment:
#      #宿主机ip
#      - SEATA_PORT=8091
#      - STORE_MODE=db
#    volumes:
#      - ./config/registry.conf:/seata-server/resources/registry.conf
#      - ./libs/mysql-connector-java-8.0.21.jar:/seata-server/libs/mysql-connector-java-8.0.21.jar
#      - ./logs:/root/logs/seata

  seata:
    image: seataio/seata-server:1.5.2
    container_name: seata-server
    restart: always
    ports:
      - "8091:8091"
      - "7091:7091"
    volumes:
      - ./seata-server/mysql-connector-java-8.0.28.jar:/seata-server/libs/mysql-connector-java-8.0.28.jar  # 数据库版本8.0以上使用此配置
      - /home/ZLMY/master/seata/zlmy-seata-application.yml:/seata-server/resources/application.yml
      - /data/docker/seata/logs:/root/logs/seata
    environment:
      TZ: Asia/Shanghai
      SEATA_PORT: 8091
  redis:
    image: redis:5.0.14
    container_name: redis
    restart: always
    ports:
      - "6379:6379"
    command: ["redis-server", "--appendonly", "yes", "--requirepass","qazwsx.101"]
    volumes:
      - /data/docker/redis/redis.conf:/etc/redis/redis.conf
      - /data/docker/redis/data:/data