Update compose.yaml

This commit is contained in:
2025-06-11 07:12:34 +00:00
parent 978c64b816
commit bd4ac7c5d4

View File

@@ -1,20 +1,19 @@
version: '3.8'
services: services:
api-server: api-server:
build: # Assuming Dockerfile for API is in the root directory build: # Assuming Dockerfile for API is in the root directory
context: ./ # Root directory context context: ./ # Root directory context
dockerfile: src/api-server/Dockerfile dockerfile: src/api-server/Dockerfile
container_name: DwinzoApi_V0_end container_name: DwinzoApi_V0_end
environment: environment:
NODE_ENV: development NODE_ENV: development
MONGO_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzodb MONGO_URI: mongodb://mongo-Dwinzocontainer:27017/dwinzodb
ports: ports:
- "4999:4999" # Host port 5000 mapped to container's port 5000 - "4999:4999" # Host port mapped to container's port
expose: expose:
- 4999 - 4999
depends_on: # Removed depends_on: - mongo (MongoDB is managed by backend)
- mongo
networks: networks:
- DwinzoMajor - DwinzoMajor
@@ -29,14 +28,15 @@ services:
- "7999:7999" # Changed host port to avoid conflict with API server - "7999:7999" # Changed host port to avoid conflict with API server
expose: expose:
- 7999 - 7999
depends_on: # Removed depends_on: - mongo
- mongo
networks: networks:
- DwinzoMajor # Socket server on the same network as the API server - DwinzoMajor # Socket server on the same network as the API server
# No `mongo` service defined here — we're using backend's MongoDB
volumes: volumes:
mongo-data: # Persistent volume for MongoDB data mongo-data: # Persistent volume for MongoDB data
networks: networks:
DwinzoMajor: DwinzoMajor:
driver: bridge external: true # Uses the same network as backend