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.sample
file to.env.test
and setUSER_SVC_DB_URI
to the MongoDB Cloud database URL for user service - In history service, copy the
.env.sample
file in.env.test
and setHISTORY_SVC_DB_URI
to the MongoDB Cloud database URL for history service - From the root of the repository, run
docker compose build
- Then run the
start.sh
bash script - To setup the horiontal pod autoscalers:
3.1. Run
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
to install the metrics server 3.2. Runkubectl -nkube-system edit deploy/metrics-server
then manually edit the Deployment manifest to add a flag--kubelet-insecure-tls
to deployment.spec.containers[].args[] 3.3. Runkubectl -nkube-system rollout restart deploy/metrics-server
3.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