From 7f7a88ae4be64d9ee434a9c75d576352deed45a6 Mon Sep 17 00:00:00 2001 From: RamkumarP Date: Wed, 11 Jun 2025 10:49:34 +0000 Subject: [PATCH] Update compose.yaml --- compose.yaml | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/compose.yaml b/compose.yaml index 1f20948..fd26722 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,3 +1,4 @@ + services: api-server: build: @@ -6,16 +7,15 @@ services: container_name: DwinzoApi_V0_end environment: NODE_ENV: development - # Connect to MongoDB on host port 27021 (where main backend MongoDB is exposed) - MONGODB_URI: mongodb://host.docker.internal:27021/dwinzo_demo_db + # Connect to the shared MongoDB from main backend + MONGODB_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzo_demo ports: - - "5001:5000" # Different port to avoid conflict with main backend + - "5001:5000" # Different host port to avoid conflict with main backend expose: - 5000 networks: - - DwinzoDemo - extra_hosts: - - "host.docker.internal:host-gateway" + - DwinzoMajor + restart: unless-stopped socket-server: build: @@ -24,20 +24,17 @@ services: container_name: DwinzoSocket_V0_end environment: NODE_ENV: development - # Connect to MongoDB on host port 27021 (where main backend MongoDB is exposed) - MONGODB_URI: mongodb://host.docker.internal:27021/dwinzo_demo_db + # Connect to the shared MongoDB from main backend + MONGODB_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzo_demo ports: - - "8002:8000" # Different port to avoid conflict with main backend + - "8001:8000" # Different host port to avoid conflict with main backend expose: - 8000 networks: - - DwinzoDemo - extra_hosts: - - "host.docker.internal:host-gateway" + - DwinzoMajor + restart: unless-stopped -# No MongoDB service - we'll connect to the main backend's MongoDB via host networking - -# Create our own network for demo backend +# No MongoDB service here - using the shared one from main backend networks: - DwinzoDemo: - driver: bridge \ No newline at end of file + DwinzoMajor: + external: true # Use the existing network from main backend \ No newline at end of file