fix(deploy): bound infrastructure container logs

This commit is contained in:
2026-09-02 15:30:29 +08:00
parent 9e0d2f6cdb
commit 25c4dd50b3
3 changed files with 39 additions and 0 deletions
+9
View File
@@ -1,10 +1,17 @@
name: firstleg-${DEPLOY_ENV:-test}-rocketmq
x-bounded-logging: &bounded-logging
driver: local
options:
max-size: ${DOCKER_LOG_MAX_SIZE:-50m}
max-file: "${DOCKER_LOG_MAX_FILE:-3}"
services:
rocketmq-namesrv:
image: apache/rocketmq:5.3.1
restart: unless-stopped
command: sh mqnamesrv
logging: *bounded-logging
networks: [infra-network]
rocketmq-broker:
@@ -17,6 +24,7 @@ services:
- ./rocketmq:/config:ro
- ${ROCKETMQ_DATA_DIR:-/data/firstleg/rocketmq/store}:/home/rocketmq/store
command: sh /config/render-broker-config.sh
logging: *bounded-logging
networks: [infra-network]
rocketmq-topic-init:
@@ -46,6 +54,7 @@ services:
-t "%DLQ%$${MQ_TOPIC_PREFIX}baiyue-audit-consumer-v1" -r 1 -w 1 -p 6'
# Broker 注册较慢或任一初始化命令失败时整组重试;所有命令均幂等。
restart: on-failure
logging: *bounded-logging
networks: [infra-network]
networks: