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
We recommend using our production environment for testing. You can find the production environment at [https://peerprep.sivarn.com](https://peerprep.sivarn.com).
@@ -6,71 +8,45 @@ A set of email/password with admin privileges will be uploaded to Canvas through
6
8
7
9
# Testing Locally
8
10
9
-
- Install Docker for your operating system. You can find the installation instructions [here](https://docs.docker.com/get-docker/).
10
-
- Clone the repository.
11
-
- Run `git submodule update --init` to clone the submodules.
12
-
- In the frontend folder, add .env file with the following content:
11
+
Clone the repository to your local machine: `git clone [email protected]:CS3219-AY2324S1/ay2324s1-course-assessment-g21.git`
12
+
Update the submodules: `git submodule update --init`
- In the firebase-auth folder, add service-account.json (file name has to be exact match) file with the following content:
20
+
Note that usually these values are kept secret, but since all of these keys have been made for test environments, we are not concerned about security. We have committed the following test-env files in assignment submissions for your convenience.
Note that usually these values are kept secret, but since this is a test environment, we are not concerned about security.
26
+
If you face any issues / if you have non-standard installations or config for any service, please modify these files appropriately.
60
27
61
28
- In the root folder, run `docker compose -f docker-compose.yml up -d`.
62
29
63
30
- Application should be running at [http://localhost](http://localhost).
64
31
65
-
# Giving yourself admin privileges
32
+
###Giving yourself admin privileges
66
33
67
-
- Login to the application in your browser using Google/Github.
68
-
- Run the following commands in your terminal:
34
+
Note that the admin portal is not accessible until you grant yourself admin privileges. You may carry out the steps here to grant yourself admin access.
69
35
70
-
```
36
+
:warning: Note that this step must be done only after all the services are up and you have successfully logged into the frontend using Google or Github.
37
+
38
+
Run the following commands in the terminal one after another:
39
+
40
+
```sql
71
41
docker exec -it peerprep-postgres bash
72
42
psql -U peerprep
73
43
UPDATE profiles SET role='admin';
74
44
```
75
45
76
46
This will give every user admin privileges. Note that this is only for testing purposes.
47
+
48
+
### Before you start testing matching
49
+
50
+
The questions repository will be empty when you first start the application. You will need to populate it with questions before you can start matching.
51
+
52
+
To do so, you can grant yourself admin priveleges as described above, and then go to the admin portal at [http://localhost/admin/question](http://localhost/admin/question). You can then add questions to the database.
0 commit comments