chore: decouple portainer consumer startup
This commit is contained in:
@@ -147,10 +147,6 @@ services:
|
||||
container_name: vehicle-history-app
|
||||
restart: unless-stopped
|
||||
mem_limit: ${VEHICLE_HISTORY_MEM_LIMIT:-1536m}
|
||||
depends_on:
|
||||
- gb32960-ingest-app
|
||||
- jt808-ingest-app
|
||||
- yutong-mqtt-app
|
||||
environment:
|
||||
<<: *common-env
|
||||
HTTP_PORT: 20200
|
||||
@@ -186,8 +182,6 @@ services:
|
||||
container_name: vehicle-analytics-app
|
||||
restart: unless-stopped
|
||||
mem_limit: ${VEHICLE_ANALYTICS_MEM_LIMIT:-1024m}
|
||||
depends_on:
|
||||
- jt808-ingest-app
|
||||
environment:
|
||||
<<: *common-env
|
||||
HTTP_PORT: 20300
|
||||
|
||||
@@ -601,13 +601,20 @@ class PortainerComposeResourceLimitsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void vehicleAnalyticsComposeDependsOnlyOnJt808Ingest() throws IOException {
|
||||
void kafkaConsumerAppsDoNotDependOnProtocolIngestContainers() throws IOException {
|
||||
String compose = Files.readString(repositoryRoot().resolve("deploy/portainer/docker-compose.yml"));
|
||||
String historyService = serviceBlock(compose, "vehicle-history-app");
|
||||
String analyticsService = serviceBlock(compose, "vehicle-analytics-app");
|
||||
|
||||
assertThat(analyticsService)
|
||||
.contains(" depends_on:\n - jt808-ingest-app")
|
||||
assertThat(historyService)
|
||||
.doesNotContain(" depends_on:")
|
||||
.doesNotContain("- gb32960-ingest-app")
|
||||
.doesNotContain("- jt808-ingest-app")
|
||||
.doesNotContain("- yutong-mqtt-app");
|
||||
assertThat(analyticsService)
|
||||
.doesNotContain(" depends_on:")
|
||||
.doesNotContain("- gb32960-ingest-app")
|
||||
.doesNotContain("- jt808-ingest-app")
|
||||
.doesNotContain("- yutong-mqtt-app");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user