services:
  namesrv:
    image: apache/rocketmq:5.4.0
    container_name: ${CONTAINER_NAME}-rmqnamesrv
    ports:
      - ${PANEL_APP_PORT_NAMESERVER}:9876
    networks:
      - opsmind-network
    volumes:
      - ./data/namesrv/logs:/home/rocketmq/logs
    command: sh mqnamesrv
    labels:
      createdBy: "Apps"
  broker:
    image: apache/rocketmq:5.4.0
    container_name: ${CONTAINER_NAME}-rmqbroker
    links:
      - namesrv
    ports:
      - ${PANEL_APP_PORT_FASTLISTEN}:10909
      - ${PANEL_APP_PORT_LISTEN}:10911
      - ${PANEL_APP_PORT_HALISTEN}:10912
    networks:
      - opsmind-network
    environment:
      - NAMESRV_ADDR=namesrv:9876
    volumes:
      - ./data/broker/logs:/home/rocketmq/logs
      - ./data/broker/store:/home/rocketmq/store
      - ./data/broker/conf/broker.conf:/opt/rocketmq-5.2.0/conf/broker.conf
    command: sh mqbroker -c /opt/rocketmq-5.2.0/conf/broker.conf
    labels:
      createdBy: "Apps"
  proxy:
    image: apache/rocketmq:5.4.0
    container_name: ${CONTAINER_NAME}-rmqproxy
    links:
      - namesrv
      - broker
    depends_on:
      - broker
    ports:
      - ${PANEL_APP_PORT_REMOTINGLISTEN}:8080
      - ${PANEL_APP_PORT_GRPCSERVER}:8081
    networks:
      - opsmind-network
    restart: on-failure
    environment:
      - NAMESRV_ADDR=namesrv:9876
    volumes:
      - ./data/proxy/logs:/home/rocketmq/logs
      - ./data/proxy/conf/rmq-proxy.json:/opt/rocketmq-5.2.0/conf/rmq-proxy.json
    command: sh mqproxy -pc /opt/rocketmq-5.2.0/conf/rmq-proxy.json
    labels:
      createdBy: "Apps"
  dashboard:
    image: apacherocketmq/rocketmq-dashboard:latest
    container_name: ${CONTAINER_NAME}-rmqdashboard
    links:
      - namesrv
    depends_on:
      - namesrv
    ports:
      - ${PANEL_APP_PORT_HTTP}:8082
    networks:
      - opsmind-network
    restart: on-failure
    environment:
      - JAVA_OPTS=-Drocketmq.namesrv.addr=namesrv:9876
    labels:
      createdBy: "Apps"
networks:
  opsmind-network:
    external: true