Files
Dwinzo-Backend-V0.0/compose.yaml

51 lines
1.2 KiB
YAML
Raw Normal View History

2025-01-22 16:59:14 +05:30
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_end
environment:
NODE_ENV: development
ports:
2025-01-24 11:50:50 +05:30
- "5000:5000" # Host port 5000 mapped to container's port 5000
2025-01-22 16:59:14 +05:30
expose:
2025-01-24 11:50:50 +05:30
- 5000
2025-01-22 16:59:14 +05:30
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_end
environment:
NODE_ENV: development
ports:
2025-01-24 11:50:50 +05:30
- "8000:8000" # Changed host port to avoid conflict with API server
2025-01-22 16:59:14 +05:30
expose:
2025-01-24 11:50:50 +05:30
- 8000
2025-01-22 16:59:14 +05:30
depends_on:
- mongo
networks:
- DwinzoMajor # Socket server on the same network as the API server
mongo:
image: mongo:latest
container_name: mongo-Dwinzocontainer
ports:
2025-01-24 11:50:50 +05:30
- "27017:27017"
2025-01-22 16:59:14 +05:30
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