diff --git a/compose.yaml b/compose.yaml index 73ba545..ceb2b32 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,50 +1,50 @@ - -services: - api-server: - build: # Assuming Dockerfile for API is in the root directory - context: ./ # Root directory context - dockerfile: src/api-server/Dockerfile - container_name: DwinzoApi_V0_end - environment: - NODE_ENV: development - ports: - - "4999:4999" # Host port 5000 mapped to container's port 5000 - expose: - - 4999 - depends_on: - - mongo - networks: - - DwinzoMajor - - socket-server: - build: # Assuming Dockerfile for Socket server is in the root directory - context: ./ # Root directory context - dockerfile: src/socket-server/Dockerfile - container_name: DwinzoSocket_V0_end - environment: - NODE_ENV: development - ports: - - "7999:7999" # Changed host port to avoid conflict with API server - expose: - - 7999 - depends_on: - - mongo - networks: - - DwinzoMajor # Socket server on the same network as the API server - - mongo: - image: mongo:latest - container_name: mongo-Dwinzocontainer - ports: - - "27021:27017" - volumes: - - mongo-data:/data/db - networks: - - DwinzoMajor # Mongo is now on the same network - - -volumes: - mongo-data: # Persistent volume for MongoDB data -networks: - DwinzoMajor: - driver: bridge + +services: + api-server: + build: # Assuming Dockerfile for API is in the root directory + context: ./ # Root directory context + dockerfile: src/api-server/Dockerfile + container_name: DwinzoApi_V0_end + environment: + NODE_ENV: development + ports: + - "4999:4999" # Host port 5000 mapped to container's port 5000 + expose: + - 4999 + depends_on: + - mongo + networks: + - DwinzoMajor + + socket-server: + build: # Assuming Dockerfile for Socket server is in the root directory + context: ./ # Root directory context + dockerfile: src/socket-server/Dockerfile + container_name: DwinzoSocket_V0_end + environment: + NODE_ENV: development + ports: + - "7999:7999" # Changed host port to avoid conflict with API server + expose: + - 7999 + depends_on: + - mongo + networks: + - DwinzoMajor # Socket server on the same network as the API server + + mongo: + image: mongo:latest + container_name: mongo-Dwinzocontainer-demo + ports: + - "27021:27017" + volumes: + - mongo-data:/data/db + networks: + - DwinzoMajor # Mongo is now on the same network + + +volumes: + mongo-data: # Persistent volume for MongoDB data +networks: + DwinzoMajor: + driver: bridge