version: '3'
services:
  # 远程桌面
  docker-headless:
    container_name: docker-headless
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/docker-headless:latest
    environment:
      SSH_PASS: headless
      VNC_PASS: headless
      VNC_PASS_RO: View123
      VNC_OFFSET: 11
      PORT_SSH: 11022
      PORT_VNC: 11081
      PORT_RDP: 11089
      L: zh_CN
      TZ: Asia/Shanghai
    restart: always
    shm_size: 1g
    ports:
      - 11081:11081
      - 11022:11022
      - 11089:11089
    volumes:
      - /tmp:/tmp
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 2G
    networks:
      blade_net:
        ipv4_address: 172.30.0.33

  ####################################################################################################
  ###===================================  监控模块  =========================================###
  ####################################################################################################

  # 容器控制台
  easydockerweb:
    container_name: easydockerweb
    #image: qfdk/easydockerweb:latest
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/easydockerweb:latest
    environment:
      - TZ=Asia/Shanghai
      - EDW_USERNAME=admin
      - EDW_PASSWORD=shd666666
    restart: always
    ports:
      - "3005:3000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      blade_net:
        ipv4_address: 172.30.0.26

  # grafana监控控制台
  # 如需中文容器内 /opt/bitnami/grafana/conf/defaults.ini 或 /usr/share/grafana/conf/defaults.ini 修改 default_language = zh-Hans
  grafana:
    container_name: grafana
    #image: grafana/grafana:11.0.0
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/grafana:11.0.0-shd
    environment:
      - TZ=Asia/Shanghai
    restart: always
    ports:
      - "3000:3000"
    networks:
      blade_net:
        ipv4_address: 172.30.0.3

  # rocketmq监控
  rocketmq-exporter:
    container_name: rocketmq-exporter
    #image: sawyerlan/rocketmq-exporter:latest
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/rocketmq-exporter:latest
    environment:
      - TZ=Asia/Shanghai
    restart: always
    ports:
      - "5557:5557"
    command: --rocketmq.config.namesrvAddr="172.30.0.46:9876"
    networks:
      blade_net:
        ipv4_address: 172.30.0.4

  # redis监控
  redis-exporter:
    container_name: redis-exporter
    #image: oliver006/redis_exporter:v1.60.0
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/redis_exporter:v1.60.0
    restart: always
    environment:
      - TZ=Asia/Shanghai
      - REDIS_ADDR=redis://172.30.0.20:6379
    ports:
      - "9121:9121"
    networks:
      blade_net:
        ipv4_address: 172.30.0.5

  # cadvisor容器监控
  cadvisor:
    container_name: cadvisor
    #image: google/cadvisor:v0.33.0
    #image: swr.cn-south-1.myhuaweicloud.com/sailheader/cadvisor:v0.33.0
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/cadvisor:v0.37.0
    hostname: "cadvisor"
    environment:
      - TZ=Asia/Shanghai
    ports:
      - 8233:8080
    volumes:
      - /:/rootfs:ro
      - /var/run:/var/run:rw
      - /sys:/sys:ro
      - /var/lib/docker/:/var/lib/docker:ro
      - /dev/disk/:/dev/disk:ro
    command: "detach=true"
    privileged: true
    restart: always
    networks:
      blade_net:
        ipv4_address: 172.30.0.6

  # postgres数据库监控
  postgres-exporter:
    container_name: postgres-exporter
    #image: prometheuscommunity/postgres-exporter:v0.15.0
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/postgres-exporter:v0.15.0
    environment:
      TZ: Asia/Shanghai
      DATA_SOURCE_NAME: postgresql://postgres:${PG_PASSWORD}@172.30.0.10:5432/postgres?sslmode=disable
    restart: always
    ports:
      - 9187:9187
    networks:
      blade_net:
        ipv4_address: 172.30.0.7

  # 服务器监控
  node-exporter:
    container_name: node-exporter
    #image: prom/node-exporter:v1.8.1
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/node-exporter:v1.8.1
    environment:
      TZ: Asia/Shanghai
    restart: always
    ports:
      - 9100:9100
    networks:
      blade_net:
        ipv4_address: 172.30.0.8

  # prometheus
  prometheus:
    container_name: prometheus
    #image: prom/prometheus:v2.52.0
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/prometheus:v2.52.0
    environment:
      TZ: Asia/Shanghai
    restart: always
    ports:
      - 9090:9090
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ${MES_FILE_PATH}/prometheus:/etc/prometheus/
    networks:
      blade_net:
        ipv4_address: 172.30.0.9

  # 链路监控
  pinpoint:
    container_name: pinpoint
    #image: 271760513/pinpoint:2.3.3
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/pinpoint:2.3.3
    environment:
      TZ: Asia/Shanghai
    privileged: true
    stdin_open: true
    tty: true
    ports:
      - "28080:8080"
      - "16010:16010"
      - "29990-29997:9990-9997"
      - "29990-29997:9990-9997/udp"
    volumes:
      - /etc/localtime:/etc/localtime:ro
    ulimits:
      nofile:
        soft: 65535
        hard: 65535
      nproc:
        soft: 65535
        hard: 65535
    restart: always
    networks:
      blade_net:
        ipv4_address: 172.30.0.36

  ####################################################################################################
  ###===================================  中间件模块  =========================================###
  ####################################################################################################

  # postgres数据库
  postgres-pro:
    container_name: postgres-pro
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/postgres:12.17-bullseye
    environment:
      POSTGRES_USER: ${PG_USER}
      POSTGRES_PASSWORD: ${PG_PASSWORD}
      TZ: Asia/Shanghai
    restart: always
    ports:
      - 5432:5432
    volumes:
      - ${MES_FILE_PATH}/postgres-pro/data:/var/lib/postgresql/data
      - ${MES_FILE_PATH}/postgres-pro/script:/var/lib/postgresql/script
      - ${MES_FILE_PATH}/postgres-pro/backups:/var/lib/postgresql/backups
    networks:
      blade_net:
        ipv4_address: 172.30.0.10
  
  # 前端存储
  minio:
    container_name: minio
    image: swr.cn-south-1.myhuaweicloud.com/cloud-custom/minio:RELEASE.2023-05-04T21-44-30Z
    environment: 
      MINIO_ROOT_USER: ${MINIO_ROOT_USER}
      MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
      TZ: Asia/Shanghai
    restart: always
    ports:
      - 9000:9000
      - 9011:9011
    volumes:
      - ${MES_FILE_PATH}/minio/data:/data
      - ${MES_FILE_PATH}/minio/config:/root/.minio
    command: server /data --console-address ":9011"
    networks:
      blade_net:
        ipv4_address: 172.30.0.15

  # rocketmq
  rocketmq:
    container_name: rocketmq-4.9.4
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/rocketmq:4.9.4   # xuchengen/rocketmq
    hostname: rocketmq
    restart: always
    environment:
      - NAMESRV_XMX=8192m # nameserver最大堆内存
      - BROKER_XMX=8192m # broker最大堆内存
      - NAMESRV_XMN=2048m # nameserver年轻代内存
      - BROKER_XMN=2048m # broker年轻代内存
      - BROKER_MDM=2048m # broker堆外内存
    volumes:
      - ${MES_FILE_PATH}/rocketmq/logs:/home/app/logs
      - ${MES_FILE_PATH}/rocketmq/broker.conf:/home/app/rocketmq/conf/broker.conf
      - /etc/localtime:/etc/localtime
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 28888:8080
      - 9876:9876
      - 10909:10909
      - 10911:10911
    networks:
      blade_net:
        ipv4_address: 172.30.0.46
  
  # rocketmq-server
  rocketmq-server:
    container_name: rocketmq-server
    image: swr.cn-south-1.myhuaweicloud.com/mes-saas/rocketmq:4.7.0
    environment: 
      - MAX_POSSIBLE_HEAP=100000000
    restart: always
    ports:
      - 9876:9876
    volumes:
      - ${MES_FILE_PATH}/rocketmq-server/logs:/root/logs
      - ${MES_FILE_PATH}/rocketmq-server/store:/root/store
    command: sh mqnamesrv
    networks:
      blade_net:
        ipv4_address: 172.30.0.46

  # rocketmq-broker
  rocketmq-broker:
    container_name: rocketmq-broker
    image: swr.cn-south-1.myhuaweicloud.com/mes-saas/rocketmq:4.7.0
    environment: 
      - autoCreateTopicEnable=true
      - MAX_POSSIBLE_HEAP=200000000
      - NAMESRV_ADDR=namesrv:9876
    links:
      - rocketmq-server:namesrv
    restart: always
    ports:
      - 10911:10911
      - 10909:10909
    volumes:
      - ${MES_FILE_PATH}/rocketmq-broker/logs:/root/logs
      - ${MES_FILE_PATH}/rocketmq-broker/store:/root/store
      - ${MES_FILE_PATH}/rocketmq-broker/conf/broker.conf:/opt/rocketmq-4.7.0/conf/broker.conf
    command: sh mqbroker -c /opt/rocketmq-4.7.0/conf/broker.conf
    networks:
      blade_net:
        ipv4_address: 172.30.0.47
  
  # nacos
  nacos:
    container_name: nacos
    image: swr.cn-south-1.myhuaweicloud.com/mes-saas/nacos:2.0.1
    hostname: nacos-standalone
    environment:
      - MODE=standalone
      - TZ=Asia/Shanghai
    restart: always
    volumes:
      - ${MES_FILE_PATH}/nacos/standalone-logs/:/home/nacos/logs
      - ${MES_FILE_PATH}/nacos/data/:/home/nacos/data
      - ${MES_FILE_PATH}/nacos/init.d/custom.properties:/home/nacos/init.d/custom.properties
    ports:
      - 8848:8848
      - 9848:9848
      - 9849:9849
    networks:
      blade_net:
        ipv4_address: 172.30.0.48
  
  # nginx
  web-nginx:
    container_name: web-nginx
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/nginx:stable-alpine-perl
    hostname: web-nginx
    environment:
      - TZ=Asia/Shanghai
    extra_hosts:
      - hostserverip:${HOST_IP}
    ports:
      - 88:88
      - 443:443
      - 8000:8000
      - 8081:8081
      - 8082:8082
      - 8083:8083
      - 8090:8090
    volumes:
      - ${MES_FILE_PATH}/web-nginx/web/key:/etc/nginx/key
      - ${MES_FILE_PATH}/web-nginx/web/html:/usr/share/nginx/html
      - ${MES_FILE_PATH}/web-nginx/web/app:/usr/share/nginx/app
      - ${MES_FILE_PATH}/web-nginx/web/avue-data:/usr/share/nginx/avue-data
      - ${MES_FILE_PATH}/web-nginx/web/di-web:/usr/share/nginx/di-web
      - ${MES_FILE_PATH}/web-nginx/web/label-designer:/usr/share/nginx/label-designer
      - ${MES_FILE_PATH}/web-nginx/web/nginx.conf:/etc/nginx/nginx.conf
    privileged: true
    restart: always
    networks:
      blade_net:
        ipv4_address: 172.30.0.24

  # redis
  redis:
    container_name: redis
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/redis:6
    hostname: redis
    environment:
      - TZ=Asia/Shanghai
    ports:
    - 6379:6379
    volumes:
    - ${MES_FILE_PATH}/redis/data:/data
    privileged: true
    restart: always
    networks:
      blade_net:
        ipv4_address: 172.30.0.20

  # 定时任务
  xxl-job:
    container_name: xxl-job
    image: swr.cn-south-1.myhuaweicloud.com/mes-saas/xxl-job:${TAG}
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/xxl-job:/mes_file
    ports:
      - 9901:9901
    networks:
      blade_net:
        ipv4_address: 172.30.0.25

  # mqtt
  mqtt:
    container_name: mqtt
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/emqx:v4.1.0
    environment:
      - TZ=Asia/Shanghai
    restart: always
    ports:
      - 1883:1883
      - 18083:18083
    networks:
      blade_net:
        ipv4_address: 172.30.0.30

  # rocketmq控制台
  rocketmq-dashboard:
    container_name: rocketmq-dashboard
    image: swr.cn-south-1.myhuaweicloud.com/sailheader/rocketmq-dashboard:1.0.0
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=-Drocketmq.namesrv.addr=172.30.0.46:9876
    restart: always
    ports:
      - 18888:8080
    networks:
      blade_net:
        ipv4_address: 172.30.0.22

  ####################################################################################################
  ###=================================  MES服务模块  =======================================###
  ####################################################################################################

  # 网关服务
  blade-gateway:
    container_name: blade-gateway
    image: "${REGISTER}/blade-gateway:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-gateway:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos 
    networks:
      blade_net:
        ipv4_address: 172.30.0.81

  
  # 认证鉴权服务
  blade-auth:
    container_name: blade-auth
    image: "${REGISTER}/blade-auth:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-auth:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos 
    networks:
      blade_net:
        ipv4_address: 172.30.0.91

  
  # 外部报表服务
  blade-report:
    container_name: blade-report
    image: "${REGISTER}/blade-report:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-report:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 2G
    depends_on:
      - nacos 
    ports:
      - 8108:8108
    networks:
      blade_net:
        ipv4_address: 172.30.0.113

  # 日志服务
  blade-log:
    container_name: blade-log
    image: "${REGISTER}/blade-log:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-log:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 2G
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.112

  # 桌面服务
  blade-desk:
    container_name: blade-desk
    image: "${REGISTER}/blade-desk:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-desk:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 2G
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.111

  # 用户服务
  blade-user:
    container_name: blade-user
    image: "${REGISTER}/blade-user:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-user:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.110

  # 系统服务
  blade-system:
    container_name: blade-system
    image: "${REGISTER}/blade-system:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-system:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.109

  # 文件资源服务
  blade-resource:
    container_name: blade-resource
    image: "${REGISTER}/blade-resource:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-resource:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.108

  # v8旧基础服务-已弃用
  blade-admin:
    image: "${REGISTER}/blade-admin:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    ports:
    - 7002:7002
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-admin:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 1024M
    depends_on:
      - nacos
    networks:
      blade_net:
        ipv4_address: 172.30.0.114

  # 看板服务
  blade-visual:
    container_name: blade-visual
    image: "${REGISTER}/blade-visual:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/blade-visual:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 2G
    depends_on:
      - nacos
    ports:
      - 8050:8050
    networks:
      blade_net:
        ipv4_address: 172.30.0.101

  # ERP对接服务
  mes-docking:
    container_name: mes-docking
    image: "${REGISTER}/mes-docking:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-docking:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    ports:
      - 9006:9006
    networks:
      blade_net:
        ipv4_address: 172.30.0.106

  # 预警服务
  mes-alert:
    container_name: mes-alert
    image: "${REGISTER}/mes-alert:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    volumes:
      - ${MES_FILE_PATH}/mes-alert:/mes_file
    restart: always
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    ports:
      - 9007:9007
    networks:
      blade_net:
        ipv4_address: 172.30.0.103
  
  # 基础服务
  mes-admin:
    container_name: mes-admin
    image: "${REGISTER}/mes-admin:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=-javaagent:/pinpoint-agent-2.5.4/pinpoint-bootstrap-3.0.1.jar -Dprofiler.transport.grpc.collector.ip=${PINPOINT_SERVER_IP} -Dpinpoint.applicationName=${ENVIRONMENT_NAME}-mes-admin
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-admin:/mes_file
      #- ${MES_FILE_PATH}/pinpoint-agent-2.5.4:/pinpoint-agent-2.5.4
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    ports:
      - 9001:9001
    networks:
      blade_net:
        ipv4_address: 172.30.0.107

  # 仓库服务
  mes-warehouse:
    container_name: mes-warehouse
    image: "${REGISTER}/mes-warehouse:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=-javaagent:/pinpoint-agent-2.5.4/pinpoint-bootstrap-3.0.1.jar -Dprofiler.transport.grpc.collector.ip=${PINPOINT_SERVER_IP} -Dpinpoint.applicationName=${ENVIRONMENT_NAME}-mes-warehouse
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-warehouse:/mes_file
      #- ${MES_FILE_PATH}/pinpoint-agent-2.5.4:/pinpoint-agent-2.5.4
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 8G
    depends_on:
      - nacos
    ports:
      - 9002:9002
    networks:
      blade_net:
        ipv4_address: 172.30.0.105

  # 品质服务
  mes-qms:
    container_name: mes-qms
    image: "${REGISTER}/mes-qms:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=-javaagent:/pinpoint-agent-2.5.4/pinpoint-bootstrap-3.0.1.jar -Dprofiler.transport.grpc.collector.ip=${PINPOINT_SERVER_IP} -Dpinpoint.applicationName=${ENVIRONMENT_NAME}-mes-qms
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-qms:/mes_file
      #- ${MES_FILE_PATH}/pinpoint-agent-2.5.4:/pinpoint-agent-2.5.4
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    ports:
      - 9005:9005
    networks:
      blade_net:
        ipv4_address: 172.30.0.104

  # 生产服务
  mes-product:
    container_name: mes-product
    image: "${REGISTER}/mes-product:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=-javaagent:/pinpoint-agent-2.5.4/pinpoint-bootstrap-3.0.1.jar -Dprofiler.transport.grpc.collector.ip=${PINPOINT_SERVER_IP} -Dpinpoint.applicationName=${ENVIRONMENT_NAME}-mes-product
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-product:/mes_file
      #- ${MES_FILE_PATH}/pinpoint-agent-2.5.4:/pinpoint-agent-2.5.4
    deploy:
      resources:
         limits:
            cpus: "4.00"
            memory: 8G
    depends_on:
      - nacos
    ports:
      - 9003:9003
    networks:
      blade_net:
        ipv4_address: 172.30.0.102

  # 计算服务 v8.6后去除
  mes-abacus:
    container_name: mes-abacus
    image: "${REGISTER}/mes-abacus:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
      #- JAVA_OPTS=-javaagent:/pinpoint-agent-2.5.4/pinpoint-bootstrap-3.0.1.jar -Dprofiler.transport.grpc.collector.ip=${PINPOINT_SERVER_IP} -Dpinpoint.applicationName=${ENVIRONMENT_NAME}-mes-abacus
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-abacus:/mes_file
      #- ${MES_FILE_PATH}/pinpoint-agent-2.5.4:/pinpoint-agent-2.5.4
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 4G
    depends_on:
      - nacos
    ports:
      - 9004:9004
    networks:
      blade_net:
        ipv4_address: 172.30.0.100

  # 云端app
  mes-cloud-service:
    container_name: mes-cloud-service
    image: "${REGISTER}/mes-cloud-service:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/mes-cloud-service:/mes_file
    deploy:
      resources:
         limits:
            cpus: "2.00"
            memory: 8G
    depends_on:
      - nacos
    ports:
      - 8888:8888
    networks:
      blade_net:
        ipv4_address: 172.30.0.205

  # DI服务
  di-service:
    container_name: di-service
    image: "${REGISTER}/di-service:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/di-service:/mes_file
    deploy:
      resources:
         limits:
            cpus: "4.00"
            memory: 8G
    ports:
      - 8091:8091
    networks:
      blade_net:
        ipv4_address: 172.30.0.208

  #scm
  scm-service:
    container_name: scm-service
    image: "${REGISTER}/scm-service:${TAG}"
    environment:
      - TZ=Asia/Shanghai
      - JAVA_OPTS=
    privileged: true
    restart: always
    volumes:
      - ${MES_FILE_PATH}/scm-service:/mes_file
    deploy:
      resources:
        limits:
          cpus: "2.00"
          memory: 8G
    depends_on:
      - nacos
    ports:
      - 9008:9008
    networks:
      blade_net:
        ipv4_address: 172.30.0.210

# 容器网关
networks:
  blade_net:
    driver: bridge
    ipam:
      config:
      - subnet: 172.30.0.0/16
