You can access peerprep here!
- Install a stable version of NodeJS. The active LTS or current version should work fine.
- Install Docker.
- macOS and Windows users can install Docker Desktop which contains both Docker and Docker-Compose tools.
- Linux users need to follow the instructions on Get Docker CE for Ubuntu and then Install Docker Compose separately.
- You are good to go when you can successfully run:
docker-compose --version
- Install ModHeader.
- To test our API, we use Google Chrome with the ModHeader extension.
- Run
git clone <url>
to clone the repository and navigate to it usingcd
in your command line or shell tool. - Run
yarn --cwd frontend/ install
to install all dependencies for frontend. - Run
mkdir pgdata
to create a directory that is used to persist data generated by and used bydb
container. (NOT YET AVAILABLE, SKIP THIS FOR NOW) - Run
docker compose up --build
to create and run all containers.
- To run a specific service, please refer to this section.
- It might take a while for all the servers to be ready when you are running it for the first time. (so please be patient ^.^)
- Point your browser to http://localhost:3000 to access the frontend.
- Point your browser to http://localhost:5000 to access the backend. (NOT YET AVAILABLE)
api
running backend server (NOT YET AVAILABLE)db
running postgresql server (NOT YET AVAILABLE)client
running frontend server
docker exec -it <container> sh
: to access a running container (Note: this container must be running before you can do this)docker compose run <service> sh -c "<command>"
: to run a one-time command against a servicedocker compose run --service-ports <service>
: to run a specific service
master
is release branch and should remain stable at all times.- Create feature branches for your in-progress features and using the format
<username>/my-feature
(doesn't have to be your GitHub username, just use something identifiable and be consistent about it). - We use a variation of Conventional Commits specification for commit messages:
- Use
[service] feat: my commit message
instead offeat: my commit message
.
Prefix your commits with these identifiers for better organization of Git history - <identifier-service> <commit message>
. For example: [user-service] feat: build oauth protocol
.
[frontend]
- frontend changes[user-service]
- backend changes[misc]
- miscellaneous changes
- build-dev.sh to build the services locally
- docker compose -f docker-compose-dev.yml up to compose the dev environment which uses binded volumes for the app code and node modules from the corresponding directory. **REQUIRED NODE DEPENDENCIES MUST ALWAYS BE INSTALLED TO USE docker-compose-dev
./clean-compose.sh <compose-file>
to compose the app cleanly.- The compose file for each assignment is within the /assignment-compose folder. ie. Simply run
./clean-compose.sh assignment-compose/docker-compose-A2-4.yml
for A2, A3 and A4 to start up the app. - Required env file is to be copied to the corresponding folder
- Frontend: frontend/.env
- Backend Servies: backend/microservices//.env