Skip to content

Commit cbaf0ad

Browse files
authored
Merge pull request #50 from guanquann/mongodb-docker
Add mongodb to Docker + Fix bugs
2 parents 5adfc36 + fe5134e commit cbaf0ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+511
-172
lines changed

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
cd ./frontend && npm run lint && npm run test
2+
cd ..
3+
4+
cd ./backend/user-service && npm run lint && npm run test
5+
cd ../..
6+
7+
cd ./backend/question-service && npm run lint && npm run test

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/bzPrOe11)
1+
# CS3219 Project (PeerPrep) - AY2425S1 Group 28
22

3-
# CS3219 Project (PeerPrep) - AY2425S1
3+
## Setting up
44

5-
## Group: G28
5+
We will be using Docker to set up PeerPrep. Install Docker [here](https://docs.docker.com/get-started/get-docker).
66

7-
### Note:
7+
Follow the instructions in the [backend directory](./backend/) first before proceeding.
88

9-
- You can choose to develop individual microservices within separate folders within this repository **OR** use individual repositories (all public) for each microservice.
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-
- 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.
9+
Run:
10+
```
11+
docker-compose up --build
12+
```
13+
14+
## Useful links
15+
16+
- User Service: http://localhost:3001
17+
- Question Service: http://localhost:3000
18+
- Frontend: http://localhost:5173

backend/.env.sample

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Credentials for MongoDB and Mongo Express.
2+
# Create a copy of this file and name it `.env`. Change the values accordingly.
3+
4+
# MongoDB credentials
5+
MONGO_INITDB_ROOT_USERNAME=root
6+
MONGO_INITDB_ROOT_PASSWORD=example
7+
8+
# Mongo Express credentials
9+
ME_CONFIG_BASICAUTH_USERNAME=admin
10+
ME_CONFIG_BASICAUTH_PASSWORD=password
11+
12+
# Do not change anything below this line
13+
ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_INITDB_ROOT_USERNAME}
14+
ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
15+
16+
ME_CONFIG_MONGODB_URL=mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongo:27017/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)