From de97d072d46c38b4c2f24c852e634a590673f997 Mon Sep 17 00:00:00 2001 From: lingniu Date: Wed, 1 Jul 2026 05:49:36 +0800 Subject: [PATCH] refactor: remove archive volume from history compose --- deploy/portainer/docker-compose.yml | 5 ----- .../PortainerComposeResourceLimitsTest.java | 13 +++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/deploy/portainer/docker-compose.yml b/deploy/portainer/docker-compose.yml index 3d49cf10..fb42d173 100644 --- a/deploy/portainer/docker-compose.yml +++ b/deploy/portainer/docker-compose.yml @@ -137,8 +137,6 @@ services: KAFKA_GROUP_HISTORY_GB32960_RAW: ${KAFKA_GROUP_HISTORY_GB32960_RAW:-${KAFKA_GROUP_HISTORY:-vehicle-history}-gb32960-raw} KAFKA_GROUP_HISTORY_JT808_RAW: ${KAFKA_GROUP_HISTORY_JT808_RAW:-${KAFKA_GROUP_HISTORY:-vehicle-history}-jt808-raw} KAFKA_GROUP_HISTORY_YUTONG_MQTT_RAW: ${KAFKA_GROUP_HISTORY_YUTONG_MQTT_RAW:-${KAFKA_GROUP_HISTORY:-vehicle-history}-yutong-mqtt-raw} - SINK_ARCHIVE_ENABLED: ${SINK_ARCHIVE_ENABLED:-true} - SINK_ARCHIVE_PATH: /archive/ TDENGINE_HISTORY_ENABLED: ${TDENGINE_HISTORY_ENABLED:-true} TDENGINE_JDBC_URL: ${TDENGINE_JDBC_URL:-jdbc:TAOS-WS://172.17.111.57:6041/vehicle_ts} TDENGINE_HISTORY_DATABASE: ${TDENGINE_HISTORY_DATABASE:-vehicle_ts} @@ -149,8 +147,6 @@ services: TDENGINE_MAX_POOL_SIZE: ${TDENGINE_MAX_POOL_SIZE:-32} ports: - "${VEHICLE_HISTORY_HTTP_PORT:-20200}:20200" - volumes: - - vehicle-history-archive:/archive networks: - vehicle-ingest @@ -185,4 +181,3 @@ networks: volumes: gb32960-ingest-data: jt808-ingest-data: - vehicle-history-archive: diff --git a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java index 2d2ebe2e..79b683aa 100644 --- a/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java +++ b/modules/apps/vehicle-history-app/src/test/java/com/lingniu/ingest/historyapp/PortainerComposeResourceLimitsTest.java @@ -48,6 +48,19 @@ class PortainerComposeResourceLimitsTest { .doesNotContain("\n TDENGINE_DATABASE:"); } + @Test + void vehicleHistoryDoesNotExposeUnusedArchiveSinkSettings() throws IOException { + String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml")); + String historyService = serviceBlock(compose, "vehicle-history-app"); + + assertThat(historyService) + .doesNotContain("SINK_ARCHIVE_ENABLED") + .doesNotContain("SINK_ARCHIVE_PATH") + .doesNotContain("/archive"); + assertThat(compose) + .doesNotContain("vehicle-history-archive:"); + } + @Test void vehicleAnalyticsComposeOnlyExposesStatConsumerEnvironment() throws IOException { String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));