You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,3 +9,38 @@
9
9
- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice.
10
10
- In the latter scenario, you should enable sub-modules on this GitHub classroom repository to manage the development/deployment **AND** add your mentor to the individual repositories as a collaborator.
11
11
- The teaching team should be given access to the repositories as we may require viewing the history of the repository in case of any disputes or disagreements.
The overall architecture of PeerPrep follows a microservices architecture. The client acts as an orchestrator for the interaction between the different services.
Copy file name to clipboardExpand all lines: apps/README.md
+31-6Lines changed: 31 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
This project uses Docker Compose to manage multiple services such as a frontend, backend, and a database. The configuration is defined in the `docker-compose.yml` file, and environment variables can be stored in environment files for different environments (e.g., development, production).
4
4
5
+
More details on how to set up Docker Compose can be found [here](../docs/setup.md)
6
+
5
7
## Prerequisites
6
8
7
9
Before you begin, ensure you have the following installed on your machine:
@@ -30,11 +32,25 @@ In the `./apps` directory:
30
32
├── user-service
31
33
│ ├── Dockerfile # Dockerfile for user-service
32
34
│ └── ... (other user-service files)
33
-
35
+
├── execution-service
36
+
│ ├── Dockerfile # Dockerfile for execution-service
37
+
│ └── ... (other execution-service files)
38
+
├── signalling-service
39
+
│ ├── Dockerfile # Dockerfile for signalling-service
40
+
│ └── ... (other signalling-service files)
41
+
├── history-service
42
+
│ ├── Dockerfile # Dockerfile for history-service
43
+
│ └── ... (other history-service files)
34
44
```
35
45
36
46
## Docker Compose Setup
37
47
48
+
Ensure that you are currently using **Docker Compose v2** in your local Docker Desktop.
49
+
- Launch your local Docker Desktop application
50
+
- Click on settings button at the top right hand corner (beside the name)
51
+
- Under the General tab, scroll down until you see a checkbox that says Use Docker Compose V2, ensure that the box is checked then apply and restart (refer to the image below)
By using multiple Dockerfiles in Docker Compose, we can manage complex multi-container applications where each service has its own environment and build process.
39
55
40
56
1. Build and Start the Application
@@ -54,11 +70,15 @@ This will:
54
70
55
71
Once running, you can access:
56
72
57
-
- The **frontend** at http://localhost:3000
58
-
- The **user service** at http://localhost:3001
59
-
- The **question service** at http://localhost:8080
60
-
- The **matching service** at http://localhost:8081
61
-
- The **redis service** at http://localhost:6379
73
+
- The [**frontend**](./frontend/README.md) at http://localhost:3000
74
+
- The [**user-service**](./user-service/README.md) at http://localhost:3001
75
+
- The [**question-service**](./question-service/README.md) at http://localhost:8080 (REST) and http://localhost:50051 (gRPC)
76
+
- The [**matching-service**](./matching-service/README.md) at http://localhost:8081
77
+
- The [**history-service**](./history-service/README.md) at http://localhost:8082
78
+
- The [**execution-service**](./execution-service/README.md) at http://localhost:8083
79
+
- The [**signalling-service**](./signalling-service/README.md) at http://localhost:4444
80
+
- The **redis** at http://localhost:6379
81
+
- The **rabbitmq** at http://localhost:5672
62
82
63
83
3. Stopping Services
64
84
@@ -76,6 +96,11 @@ This command will stop and remove the containers, networks, and volumes created
76
96
77
97
-**Port Conflicts**: If you encounter port conflicts, ensure the host ports specified in docker-compose.yml (e.g., 3000:3000) are not in use by other applications.
78
98
-**Environment Variables Not Loaded**: Ensure the `.env` files are in the correct directories as found in the `docker-compose.yml` file.
99
+
-**Command execution failed**: When you try running test cases or submitting the code in the collaborative environment, if you encounter the following error message:
100
+
```bash
101
+
Command execution failed: Unable to find image 'apps-python-sandbox:latest' locally docker: Error response from daemon: pull access denied for apps-python-sandbox, repository does not exist or may require 'docker login': denied: requested access to the resource is denied. See 'docker run --help'. :exit status 125
102
+
```
103
+
Ensure that you have **Docker Compose V2** enabled for your Docker Desktop application. Please refer to the Docker Compose setup guide above to enable it locally.
0 commit comments