Update compose.yaml

This commit is contained in:
2025-06-11 10:22:20 +00:00
parent d1e70423ca
commit 7b36a1aa86

View File

@@ -1,4 +1,3 @@
services: services:
api-server: api-server:
build: build:
@@ -7,17 +6,16 @@ services:
container_name: DwinzoApi_V0_end container_name: DwinzoApi_V0_end
environment: environment:
NODE_ENV: development NODE_ENV: development
# Connect to shared MongoDB container from main backend # Connect to MongoDB on host port 27021 (where main backend MongoDB is exposed)
MONGODB_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzo_demo_db MONGODB_URI: mongodb://host.docker.internal:27021/dwinzo_demo_db
ports: ports:
- "5001:5000" # Different port to avoid conflict with main backend - "5001:5000" # Different port to avoid conflict with main backend
expose: expose:
- 5000 - 5000
networks: networks:
- DwinzoMajor - DwinzoDemo
# Remove depends_on mongo since we're using external container extra_hosts:
external_links: - "host.docker.internal:host-gateway"
- mongo-Dwinzocontainer
socket-server: socket-server:
build: build:
@@ -26,22 +24,20 @@ services:
container_name: DwinzoSocket_V0_end container_name: DwinzoSocket_V0_end
environment: environment:
NODE_ENV: development NODE_ENV: development
# Connect to shared MongoDB container from main backend # Connect to MongoDB on host port 27021 (where main backend MongoDB is exposed)
MONGODB_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzo_demo_db MONGODB_URI: mongodb://host.docker.internal:27021/dwinzo_demo_db
ports: ports:
- "8001:8000" # Different port to avoid conflict with main backend - "8001:8000" # Different port to avoid conflict with main backend
expose: expose:
- 8000 - 8000
networks: networks:
- DwinzoMajor - DwinzoDemo
# Remove depends_on mongo since we're using external container extra_hosts:
external_links: - "host.docker.internal:host-gateway"
- mongo-Dwinzocontainer
# Remove mongo service completely - we'll use the one from main backend # No MongoDB service - we'll connect to the main backend's MongoDB via host networking
# Use external network created by main backend # Create our own network for demo backend
networks: networks:
DwinzoMajor: DwinzoDemo:
external: true driver: bridge
name: dwinzobackend_DwinzoMajor # This should match the network name created by main backend