version: "3.9" x-rocketmq-common: &rocketmq-common image: apache/rocketmq:5.2.0 privileged: true user: root restart: always x-traefik-web-label: &traefik-web-label traefik.enable: true traefik.http.routers.rocketmq-web.service: rocketmq-web traefik.http.services.rocketmq-web.loadbalancer.server.port: 8080 services: rocketmq-setup: image: busybox container_name: rocketmq-setup volumes: - /volume5/storage/docker-data/rocketmq/conf/:/conf/ - /volume5/storage/docker-data/rocketmq/broker/:/data/ command: sh /conf/setup.sh restart: always rocketmq-namesrv: <<: *rocketmq-common container_name: rocketmq-namesrv ports: - "9876:9876" expose: - 9876 volumes: - /volume5/storage/docker-data/rocketmq/namesrv/logs/:/logs/ command: sh mqnamesrv rocketmq-broker-1: <<: *rocketmq-common container_name: rocketmq-broker-1 hostname: rocketmq-broker-1 expose: - 10909 - 10911 - 10912 volumes: - /volume5/storage/docker-data/rocketmq/broker/1/logs/:/home/rocketmq/logs/ - /volume5/storage/docker-data/rocketmq/broker/1/store/:/home/rocketmq/store/ - /volume5/storage/docker-data/rocketmq/broker/:/data/ command: sh mqbroker -n rocketmq-namesrv:9876 -c /data/1/broker.conf depends_on: - rocketmq-setup - rocketmq-namesrv environment: JAVA_OPT_EXT: "-Xms4096m -Xmx4096m" deploy: resources: limits: memory: 8g rocketmq-broker-2: <<: *rocketmq-common container_name: rocketmq-broker-2 hostname: rocketmq-broker-2 expose: - 10909 - 10911 - 10912 volumes: - /volume5/storage/docker-data/rocketmq/broker/2/logs/:/home/rocketmq/logs/ - /volume5/storage/docker-data/rocketmq/broker/2/store/:/home/rocketmq/store/ - /volume5/storage/docker-data/rocketmq/broker/:/data/ command: sh mqbroker -n rocketmq-namesrv:9876 -c /data/2/broker.conf depends_on: - rocketmq-setup - rocketmq-namesrv environment: JAVA_OPT_EXT: "-Xms4096m -Xmx4096m" deploy: resources: limits: memory: 8g rocketmq-dashboard: image: apacherocketmq/rocketmq-dashboard container_name: rocketmq-dashboard labels: <<: *traefik-web-label privileged: true user: root expose: - "8080" volumes: - /volume5/storage/docker-data/rocketmq/dashboard/tmp/:/tmp/ environment: JAVA_OPTS: -Drocketmq.namesrv.addr=rocketmq-namesrv:9876 restart: always