diff --git a/backend/services/docker-compose.yml b/backend/services/docker-compose.yml index a4d6f31f..ada6d021 100644 --- a/backend/services/docker-compose.yml +++ b/backend/services/docker-compose.yml @@ -61,9 +61,12 @@ services: TZ: Asia/Shanghai ZOOKEEPER_CLIENT_PORT: 2181 ZOOKEEPER_TICK_TIME: 2000 + # Java timezone for confluentinc images + KAFKA_OPTS: "-Duser.timezone=Asia/Shanghai" volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro + - /usr/share/zoneinfo:/usr/share/zoneinfo:ro healthcheck: test: ["CMD", "nc", "-z", "localhost", "2181"] interval: 10s @@ -91,9 +94,12 @@ services: KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" + # Java timezone for confluentinc images + KAFKA_OPTS: "-Duser.timezone=Asia/Shanghai" volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro + - /usr/share/zoneinfo:/usr/share/zoneinfo:ro healthcheck: test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"] interval: 30s