From d9d8994e500b0c14868fa8ef5082a5ef02d4fcf1 Mon Sep 17 00:00:00 2001 From: tsulim Date: Fri, 4 Oct 2024 17:37:05 +0800 Subject: [PATCH] Update docker-compose --- docker-compose.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8438ce233a..977e8fecb4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,23 +6,23 @@ services: question-service: build: ./backend/question-service # Path to the directory containing the Dockerfile for building the question-service image. ports: - - 5000:5000 # Maps port 3000 on the host to port 3000 in the container, making the app accessible on the host. + - 5000:5000 # Maps port 5000 on the host to port 5000 in the container, making the app accessible on the host. volumes: - - ./backend/question-service:/app # Mounts the host directory './demo-app' to '/app' in the container. - - /app/node_modules # Anonymous Volume + - ./backend/question-service:/app/question # Mounts the host directory './backend/question-service' to '/app/question' in the container. + - /app/question/node_modules # Anonymous Volume networks: - - demo-network # Connects the demo-app to the 'demo-network' network. + - peerprep-network # Connects the question-service to the 'peerprep-network' network. user-service: - build: ./backend/user-service + build: ./backend/user-service # Path to the directory containing the Dockerfile for building the user-service image. ports: - - 5001:5001 + - 5001:5001 # Maps port 5001 on the host to port 5001 in the container, making the app accessible on the host. volumes: - - ./backend/user-service:/app - - /app/node_modules + - ./backend/user-service:/app/user # Mounts the host directory './backend/user-service' to '/app/user' in the container. + - /app/user/node_modules # Anonymous Volume networks: - - demo-network + - peerprep-network # Connects the user-service to the 'peerprep-network' network. networks: - demo-network: # Defines a network named 'demo-network'. - driver: bridge # Uses the bridge driver for the network, which is the default and most common network type in Docker. + peerprep-network: # Defines a network named 'peerprep-network'. + driver: bridge # Uses the bridge driver for the network, which is the default and most common network type in Docker. \ No newline at end of file