Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(compose): drop the unused compose-file mount from openwa-api

Yudhi Armyndharis827152d86782
diff --git a/docker-compose.yml b/docker-compose.yml
index 5e87e09ed..864c02432 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -396,7 +396,6 @@ services:
- DOCKER_HOST=tcp://docker-proxy:2375
volumes:
- openwa-data:/app/data
- - ./docker-compose.yml:/app/docker-compose.yml:ro
depends_on:
docker-proxy:
condition: service_started
diff --git a/src/modules/docker/compose-network.spec.ts b/src/modules/docker/compose-network.spec.ts
index e462d5854..4c6add70f 100644
--- a/src/modules/docker/compose-network.spec.ts
+++ b/src/modules/docker/compose-network.spec.ts
@@ -5,7 +5,7 @@ import { join } from 'path';
const yaml = require('js-yaml') as { load: (src: string) => unknown };
interface ComposeFile {
- services: Record<string, { networks?: string[] }>;
+ services: Record<string, { networks?: string[]; volumes?: string[] }>;
networks: Record<string, { internal?: boolean }>;
}
@@ -27,4 +27,10 @@ describe('docker-compose network segmentation', () => {
it('lets openwa-api reach the proxy via the internal network', () => {
expect(compose.services['openwa-api'].networks).toContain('internal-docker');
});
+
+ // Nothing in the image reads a compose file, and a short-syntax bind whose source is missing (the
+ // stack started with `-f other.yml`) makes Docker create an empty host directory in its place.
+ it('mounts only the data volume into openwa-api', () => {
+ expect(compose.services['openwa-api'].volumes).toEqual(['openwa-data:/app/data']);
+ });
});