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
* got rid of console logs, jsut commented them out for now the next team can uncomment them where needed
* modified readme and added a deployment information and tips document to keep readme from getting any longer
Copy file name to clipboardExpand all lines: README.md
+32-19Lines changed: 32 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,18 @@ A highly scalable web application that assists the process of coordinating and e
4
4
5
5
**Before contributing, see our [Contribution Guidelines](#Contributing).**
6
6
7
+
**NOTE: The purpose of this ReadMe is to get you started with running the application. It does not provide specific information
8
+
about how the deployment process of this application works. For deeper information on deployment of this application, read the
9
+
PDF found in the `startUpDocumentation` folder.**
10
+
7
11
## Running the Project
8
12
9
13
First things, first, **clone this repository**.
10
14
11
15
There are multiple conifigurations for running the application in different environments to make the application
12
16
machine and OS agnostic. The possible configurations are:
13
17
-[Production](#Running-In-a-Production-Environment): For when you want the app out for full use
14
-
-[Local Development](#Running-In-a-Local-Development-Environment): The production app but running only on a localhost network for testing
18
+
-[Local](#Running-In-a-Local-Environment): The production app but running only on a localhost network for testing
15
19
-[Run Each Backend Microservice Individually](#Running-Backend-Microservices-Individually): Run each backend service independently of eachother for testing on specific microservices
16
20
-[Run The Frontend Microservice Individually](#Running-Frontend-Microservice-Individually): Test the frontend service with a subset of the backend microservices
17
21
@@ -53,9 +57,12 @@ All environments will need Google Cloud Console Credentials.
53
57
54
58
**Step 1:** Clone the repository.
55
59
56
-
**Step 2:** Go the the `docker-compose.yml` file found in root. At the bottom of the file under the **nginx** container, make the docker host port equal to whatever port you have listed in the URL environment variable. So if I was running the app with the URL **https://example.com:443**, the configuration at the bottom of the file would look like this:
60
+
**Step 2a:** Go to the `docker-compose.yml` file found in root. At the bottom of the file under the **nginx** container, make the docker host port equal to whatever port you have listed in the URL environment variable. So if I was running the app with the URL **https://example.com:443**, the configuration at the bottom of the file would look like this:
**Step 2b:** Copy the location of the PEM keys to the **nginx** container found here:
64
+

65
+
59
66
**Step 3:** In the `.env` file, make the **JWK_ACCESS_URL** equal to whatever your URL variable is followed by **/jwt/ibm/api/cpr_access/jwk**. So if the URL is **https://example.com:443**, **JWK_ACCESS_URL** should be `https://example.com:443/jwt/ibm/api/cpr_access/jwk`
60
67
61
68
**Step 4:** In the `.env` file, make the **JWK_REFRESH_URL** equal to whatever your URL variable is followed by **/jwt/ibm/api/cpr_refresh/jwk**. So if the URL is **https://example.com:443**, **JWK_ACCESS_URL** should be `https://example.com:443/jwt/ibm/api/cpr_refresh/jwk`
@@ -66,11 +73,13 @@ All environments will need Google Cloud Console Credentials.
66
73
67
74
The web application should be running on the specified domain in your `.env` file.
68
75
69
-
**Step 7:** To add users with elevated privileges (a.k.a professors), include the user's email on separate lines in `professor-list.txt`.
76
+
**Step 7:** To add users with elevated privileges (a.k.a professors), an Admin must add their email handle and name in the list
77
+
of users in the admin interface. Note that the first person who ever logs into the application
78
+
is granted admin privileges and can demote and promote other users as needed.
70
79
71
80
72
81
73
-
### Running In a Local Development Environment
82
+
### Running In a Local Environment
74
83
**Step 1:** Clone the repository.
75
84
76
85
**Step 2:** Go the the `docker-compose-local.yml` file found in root. If running on an Apple Silicon Mac (M1 or M2) go to the docker-compose-local-m1.yml file instead. At the bottom of the file under the **nginx** container, make the docker host port equal to whatever port you have listed in the URL environment variable. So if I was running the app with the URL **http://localhost.com:443**, the configuration at the bottom of the file would look like this:
@@ -90,7 +99,9 @@ The web application should be running on the specified domain in your `.env` fil
90
99
91
100
The web application should be running on the specified domain in your `.env` file.
92
101
93
-
**Step 7:** To add users with elevated privileges (a.k.a professors), include the user's email on separate lines in `professor-list.txt`.
102
+
**Step 7:** To add users with elevated privileges (a.k.a professors), an Admin must add their email handle and name in the list
103
+
of users in the admin interface. Note that the first person who ever logs into the application
104
+
is granted admin privileges and can demote and promote other users as needed.
94
105
95
106
### Running Backend Microservices Individually
96
107
**Before running anything individually, you will need:**
@@ -116,6 +127,7 @@ The web application should be running on the specified domain in your `.env` fil
116
127
**Step 2:** Go to the `scripts` folder in the root directory and run the `independently-run-db.sh` shell script. If running on an Apple Silicon Mac (M1 or M2) run the `independently-run-db-m1.sh` shell script. If you haven't already, also run the `mongo-init.sh` shell script afterwards.
117
128
118
129
**Step 3:** You can now run the backend microservices separately. Simply go to the root of each microservice where the `pom.xml` file is located and run `mvn liberty:dev` to start the microservice. The web app should be running on http://localhost:xxxxx - the port depends on which microservice you are running as following:
130
+
119
131
| Microservice | Port |
120
132
|----------------------------------|---------|
121
133
|`login`|`13126`|
@@ -128,7 +140,7 @@ The web application should be running on the specified domain in your `.env` fil
128
140
129
141
### Running Frontend Microservice Individually
130
142
131
-
To run the frontend outside of the docker-compose network, we will only run the databases and nginx webserver with docker such that the webserver reroutes any traffic to the microservices that will be running outside of the docker-compose network.
143
+
To run the frontend outside of the docker-compose network, we will only run the databases and nginx webserver with docker.
132
144
133
145
**Before running anything individually, you will need:**
**Step 2:** Go inside the folder `CSC480-22S/frontend/src/main/frontend` and create a .env file. Add the following lines to the file:
154
166
`export REACT_APP_URL=http://localhost:3000/`
@@ -160,9 +172,10 @@ To run the frontend outside of the docker-compose network, we will only run the
160
172
161
173
**Step 4:** Go to the `scripts` folder in the root directory and run the `run-frontend-proxy.sh` shell script. If running on an Apple Silicon Mac, run the `run-frontend-proxy-m1.sh` script instead. If you haven't already, also run the `mongo-init.sh` shell script afterwards.
162
174
163
-
**Step 5:** You can now run microservices independently. Simply go to the root of each backend microservice where the `pom.xml` file is located and run `mvn liberty:dev` to start the microservice. To run the frontend service, go to the folder located at `CSC480-22S/frontend` and run `mvn process-resources liberty:dev` to start the frontend service. You will be able to reach the front end at `http://localhost:3000`.
175
+
**Step 5:** You can now run microservices independently. Simply go to the root of each backend microservice where the `pom.xml` file is located and run `mvn liberty:dev` to start the microservice. To run the frontend service, go to the folder located at `CSC480-22S/frontend/src/main/frontend` and run `PORT=<whatever port you want> npm run start` to start the frontend service. Ensure the port you pick does not conflict with any other applications. You will be able to reach the front end at `http://localhost:<The port you specified>`.
176
+
177
+
The backend microservices should be running on http://localhost:xxxxx - the port depends on which microservice you are running:
164
178
165
-
The backend microservices should be running on http://localhost:xxxxx - the port depends on which microservice you are running as following:
Copy file name to clipboardExpand all lines: frontend/src/main/frontend/src/components/ProfessorComponents/AssignmentPage/ProfessorEditAssignmentComponent.js
0 commit comments