diff --git a/eg3/README.md b/eg3/README.md index 47a5306..1199649 100644 --- a/eg3/README.md +++ b/eg3/README.md @@ -22,7 +22,9 @@ In this section, we test frontend container can cross-communicate with backend c Steps: 1. Comment out proxy container -2. frontend has port 80 exposed; backend has port 5000 exposed; +2. Remove exposed of both containers, as we they don't need expose their ports to outside environment. We just want to test their cross-communication in the same docker network + 1. port 80 for frontend; + 2. port 5000 for backend; 3. Run `docker compose build` & `docker compose up` 4. Create a network: `docker network create mynetwork` 5. Add containers into network diff --git a/eg3/docker-compose.yaml b/eg3/docker-compose.yaml index 4da4dbe..c34fb6b 100644 --- a/eg3/docker-compose.yaml +++ b/eg3/docker-compose.yaml @@ -17,13 +17,9 @@ services: build: context: ./frontend dockerfile: Dockerfile - ports: - - "80:80" # Uncomment this line if you want to run the frontend container only backend: container_name: backend build: context: ./backend - dockerfile: Dockerfile - ports: - - "5000:5000" # Uncomment this line if you want to run the backend container only \ No newline at end of file + dockerfile: Dockerfile \ No newline at end of file