CoCoder is an interview preparation platform and peer matching system where sutdents can find peers to practice interview questions together.
Visit CoCoder at https://cocoder.link
To run services individually, refer to the README in each services' folder.
- Frontend
- User Service
- Matching Service
- Collaboration Service
- History Service
- Question Service
- Communication Service
Prerequisites
- Installed Docker
Start up
From the root of the repository, run
docker compose up --build
View the webpage at http://localhost
Tear down
docker compose down
Prerequisites
Start up
- In user service, copy the
.env.samplefile to.env.testand setUSER_SVC_DB_URIto the MongoDB Cloud database URL for user service - In history service, copy the
.env.samplefile in.env.testand setHISTORY_SVC_DB_URIto the MongoDB Cloud database URL for history service - From the root of the repository, run
docker compose build - Then run the
start.shbash script - To setup the horiontal pod autoscalers:
3.1. Run
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yamlto install the metrics server 3.2. Runkubectl -nkube-system edit deploy/metrics-serverthen manually edit the Deployment manifest to add a flag--kubelet-insecure-tlsto deployment.spec.containers[].args[] 3.3. Runkubectl -nkube-system rollout restart deploy/metrics-server3.4. Runkubectl apply -f k8s/manifests/hpa.yaml - Visit the webpage at
http://localhost
Tear down
kind delete cluster --name kind-1
Debugging
- Check that deployments are running
kubectl get deployment
- Check that services are running
kubectl get service
- Check that Ingress Controller is ready
- May need to wait 1-2 minutes to be ready
kubectl -n ingress-nginx get deploy -w
- Check that ingress is ready
- Wait for the "ADDRESS" column to show "localhost"
kubectl get ingress -w
-
Check backend service logs
-
Get pod name of service with
kubectl get po -
Check logs with
kubectl logs pod-name
-
-
Check that the metrics server is running:
kubectl get pods --all-namespaces | findstr metrics-server