Here's an elaborated version of your README that provides more clarity and organization:
Welcome to Group 35's submission for the CS3219 PeerPrep Project! This README provides the necessary instructions for deploying and developing the PeerPrep application.
The PeerPrep application consists of a backend and frontend, both of which can be deployed using Docker. Follow the respective instructions below to set up the services.
Before you proceed, ensure the following software is installed on your system:
- Docker: For containerizing and deploying the application.
Deploy the complete application, including both the backend and frontend services.
-
Clone this repository:
git clone https://github.com/CS3219-AY2425S1/cs3219-ay2425s1-project-g35 cd cs3219-ay2425s1-project-g35
-
Run the following command to deploy the entire application:
docker-compose up -d
- This will start all services defined in the
docker-compose.yaml
file.
- This will start all services defined in the
-
Access the application through the specified frontend URL or backend endpoints.
If you only need to deploy the frontend (e.g., for UI testing), follow these steps:
- Run the following command:
docker-compose -f docker-compose-backend.yaml up -d
- This will deploy without the frontend.
- Node.js installed
- Run
npm install
within theFrontend
folder - Run
npm run dev
within theFrontend
folder
If you're contributing to the development of this project, here are some guidelines to get started.
- Docker (as above)
To ensure code quality, you can run integration tests using a dedicated Docker Compose configuration file.
- Use the provided test compose file:
docker-compose -f docker-compose-tests.yaml up -d --build
- This will build and run the test environment as defined in
docker-compose-tests.yaml
.
- This will build and run the test environment as defined in
Due to the way questions are seeded, if the earlier seeded questions are still in the mongo database, new questions with the same details/slightly changed details will be rejected.
- Run
docker compose down -v --remove-orphans
If you've made changes to nginx.conf
, you will need to bring down the project before rebuilding nginx.
- Run
docker compose down
- Run
docker compose up -d --build
Alternatively, you can use --force-recreate
- You can also use
docker compose up -d --build --force-recreate
to ensure that Docker recreates the nginx container
3. If you've added a new service to the docker-compose.yaml
file, make the same changes to the tests and backend files
If not, the integration tests may fail