Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
255 commits
Select commit Hold shift + click to select a range
a5697c9
Add expressjs and gitignore
martinng01 Sep 19, 2024
0aaac5a
Merge pull request #4 from martinng01/main
martinng01 Sep 22, 2024
932d37e
Add Express JS base
martinng01 Sep 23, 2024
72bca66
Merge pull request #5 from martinng01/questions/api
martinng01 Sep 23, 2024
f8ed696
Add validation
martinng01 Sep 23, 2024
7bcc581
Merge branch 'CS3219-AY2425S1:questions/api' into questions/api
martinng01 Sep 23, 2024
6fd5df2
Merge pull request #6 from martinng01/questions/api
martinng01 Sep 23, 2024
930c175
Add validation for create function (#7)
martinng01 Sep 23, 2024
8b89c2a
Connect question-service backend to Mongo DB.
zengzihui Sep 24, 2024
35428c8
Merge pull request #8 from zengzihui/main
zengzihui Sep 24, 2024
46cab8d
Added Update and Delete
peiran18 Sep 24, 2024
eeeba3d
Added Update and Delete
peiran18 Sep 24, 2024
170fc4a
Add gitignore for .vscode
martinng01 Sep 24, 2024
62daba3
Merge questions-service and questions/api branches
martinng01 Sep 24, 2024
14ae66e
Link create function to db
martinng01 Sep 24, 2024
608fb81
Refactor difficulty enum in types to models
martinng01 Sep 24, 2024
8486ba7
Link create function to db
martinng01 Sep 24, 2024
6287583
Merge branch 'questions/api' of https://github.com/martinng01/cs3219-…
martinng01 Sep 24, 2024
e544a5b
Merge pull request #12 from martinng01/questions/api
czhiruo Sep 24, 2024
2c758b8
Link Update and Delete to db
peiran18 Sep 24, 2024
4eb650d
frontend ver1
Sep 24, 2024
ca7b119
Base
Sep 24, 2024
8f718ca
Merge remote-tracking branch 'origin/testing_frontend' into connect-f…
czhiruo Sep 27, 2024
d886f96
installed bootstrap
czhiruo Sep 27, 2024
d4f0925
installed axios and linked backend for question list component
czhiruo Sep 27, 2024
df1fc5d
installed cors
czhiruo Sep 27, 2024
0068fb9
updated the reference to json data in frontend in QuestionList
czhiruo Sep 27, 2024
dd2c60e
link add and update
czhiruo Sep 27, 2024
a9c4a23
install concurrently
czhiruo Sep 28, 2024
c380cff
Update API endpoints
martinng01 Sep 28, 2024
bc0df3d
Update GET response
martinng01 Sep 28, 2024
1486409
Change PUT to PATCH for updating questions
martinng01 Sep 28, 2024
017db7f
Merge pull request #15 from martinng01/questions/api
czhiruo Sep 28, 2024
dc50832
Debug update and delete
peiran18 Sep 28, 2024
14d81b8
set up abstracted functions inapi.js under services folder
czhiruo Sep 28, 2024
e8382c5
Merge branch 'questions/api' of https://github.com/CS3219-AY2425S1/cs…
peiran18 Sep 28, 2024
b57977d
made a copy of api.js in frontend folder
czhiruo Sep 28, 2024
e89773c
updated api links
czhiruo Sep 28, 2024
2205569
Merge branch 'questions/api' into fixed_frontend_backend
czhiruo Sep 28, 2024
a6db867
fixed the links to backend
czhiruo Sep 28, 2024
bd772c1
Merge branch 'questions/api' into fixed_frontend_backend
czhiruo Sep 28, 2024
d49777a
deleted services folder in root
czhiruo Sep 29, 2024
76f91a3
Merge pull request #16 from czhiruo/fixed_frontend_backend
peiran18 Sep 29, 2024
b7977ff
Beautifying UI
Sep 29, 2024
10fc8df
fix front end part 1
Sep 29, 2024
ec97e92
fix frontend part 2
Sep 29, 2024
130d24c
fix group title
Sep 29, 2024
c5fbaba
fixed mongo backend issue
Sep 29, 2024
5db4791
fixed the bug of cannot view questions
Sep 29, 2024
f228d83
fix bugs related to update
Sep 29, 2024
469baf7
Updated rendering of question details when clicked
czhiruo Sep 29, 2024
f74245d
Minor changes to render complexity of question
czhiruo Sep 29, 2024
682e468
Merge pull request #24 from czhiruo/main
czhiruo Sep 29, 2024
88f65ff
Add unmodified user service
martinng01 Oct 2, 2024
97206fd
Merge pull request #34 from martinng01/user-service
martinng01 Oct 2, 2024
58a13b3
Add user service api functions
martinng01 Oct 2, 2024
61c82d0
Add Select Complexity ui
peiran18 Oct 3, 2024
a8e9575
Add Sign Up ui
peiran18 Oct 3, 2024
c8d55e1
Add Login ui
peiran18 Oct 3, 2024
17debe3
Merge remote-tracking branch 'origin/main' into user-service
martinng01 Oct 3, 2024
75a188e
Fix tailwind and delete unnecessary files
martinng01 Oct 3, 2024
4bd7dff
Linked Login and Signup
martinng01 Oct 3, 2024
35f9fda
Add routing functionalities
martinng01 Oct 3, 2024
092ee35
Merge branch 'CS3219-AY2425S1:user-service' into user-service
martinng01 Oct 4, 2024
cf192ec
Merge pull request #35 from martinng01/user-service
martinng01 Oct 4, 2024
04e8fad
Edit Login Page ui to use daisyui components
peiran18 Oct 4, 2024
0638cc0
Edit SignUp Page to use daisyui. Fixed white border bug.
peiran18 Oct 4, 2024
cf19c95
Add Reset Password Page ui
peiran18 Oct 4, 2024
18b801a
Add Logout dropdown ui
peiran18 Oct 4, 2024
146d47d
Updated package.json
martinng01 Oct 4, 2024
c0054b8
Add placeholder avatar
martinng01 Oct 4, 2024
9f22aca
Extract header to component file
martinng01 Oct 4, 2024
e6e3dc8
Add routing for user UI
martinng01 Oct 4, 2024
dca7fc6
Merge pull request #36 from martinng01/user-service
martinng01 Oct 4, 2024
5eb8403
added dockerfiles for question service and frontend
czhiruo Oct 4, 2024
9c04e28
Merge pull request #37 from czhiruo/dockerisation
czhiruo Oct 4, 2024
e88cf40
Updated login and logout ui
peiran18 Oct 5, 2024
241bf23
Merge pull request #38 from peiran18/user-service
peiran18 Oct 5, 2024
ecc598f
Add user service to concurrently scripts
martinng01 Oct 5, 2024
c36c923
Merge pull request #40 from martinng01/user-service
martinng01 Oct 5, 2024
db1858a
updated login page to email only
czhiruo Oct 5, 2024
c6f6a2b
changed url reference name for question service
czhiruo Oct 5, 2024
963f016
Merge pull request #39 from CS3219-AY2425S1/user-service
czhiruo Oct 5, 2024
3a607a4
Merge branch 'main' into dockerisation
czhiruo Oct 5, 2024
26e2e29
added Dockerfile for user service
czhiruo Oct 5, 2024
32d6bd7
Merge pull request #41 from czhiruo/dockerisation
czhiruo Oct 5, 2024
a072ebe
Merge pull request #42 from CS3219-AY2425S1/dockerisation
zengzihui Oct 6, 2024
ad94eff
Fix dockerisation and admin routing
martinng01 Oct 6, 2024
669bf8f
Merge pull request #74 from martinng01/dockerisation
martinng01 Oct 6, 2024
237bd9c
Merge pull request #75 from CS3219-AY2425S1/dockerisation
czhiruo Oct 6, 2024
c6390f3
Add attempted questions in user model
martinng01 Oct 13, 2024
445d740
Link to http routes
martinng01 Oct 13, 2024
fde9c0c
Add listing question attempts
martinng01 Oct 13, 2024
b9f76d6
implemented rememberMe functionality for user-service
czhiruo Oct 14, 2024
c3333ae
Added Select Topic Page ui
peiran18 Oct 14, 2024
2ee05e9
Updated Select Complexity Page ui
peiran18 Oct 14, 2024
b2aad71
Added Select Language Page ui
peiran18 Oct 14, 2024
780ab84
Added Matching Page ui
peiran18 Oct 14, 2024
a307473
Merge pull request #76 from peiran18/matching-service
peiran18 Oct 14, 2024
4162ac8
implement password reset function
czhiruo Oct 15, 2024
08e3158
include error message for request reset password page
czhiruo Oct 16, 2024
53b02db
Merge pull request #77 from czhiruo/user-service
czhiruo Oct 16, 2024
8a621fb
Added Matched Page ui
peiran18 Oct 16, 2024
f482faf
Added History Page ui
peiran18 Oct 16, 2024
7a9f958
Added Matching Failed Page ui
peiran18 Oct 16, 2024
d558ef8
Fixed ui bugs
peiran18 Oct 16, 2024
8e0b399
Merge pull request #78 from peiran18/matching-service
peiran18 Oct 16, 2024
bc11072
set redirection of routes after resetting password
czhiruo Oct 17, 2024
a40ae7d
Merge branch 'user-service' into user-service
martinng01 Oct 18, 2024
afe62b3
Merge pull request #79 from martinng01/user-service
martinng01 Oct 18, 2024
560b14a
Merge branch 'matching-service' into user-service
martinng01 Oct 18, 2024
d28b9a4
Link history
martinng01 Oct 18, 2024
07e792f
added ui for sign up messages
czhiruo Oct 19, 2024
c805f56
updated error messages for request reset password page
czhiruo Oct 19, 2024
a71bfc0
Merge pull request #81 from czhiruo/user-service
czhiruo Oct 19, 2024
163c8d5
updated rememberme functionality
czhiruo Oct 19, 2024
d47afeb
Merge pull request #82 from czhiruo/user-service
czhiruo Oct 19, 2024
9bd73ee
Add history button and hide profile photo if not logged in
martinng01 Oct 20, 2024
0021d5e
Add routing and state management for question selections
martinng01 Oct 20, 2024
5bc9bb8
Refactor colour for selection code
martinng01 Oct 20, 2024
6f0bd6a
Fix bugs
martinng01 Oct 20, 2024
99f180c
Merge branch 'CS3219-AY2425S1:user-service' into user-service
martinng01 Oct 20, 2024
a26b550
Merge pull request #83 from martinng01/user-service
martinng01 Oct 20, 2024
bf3b3de
Add next button conditions
martinng01 Oct 20, 2024
f856add
Update history formatting
martinng01 Oct 20, 2024
e0837f6
Merge pull request #84 from martinng01/user-service
martinng01 Oct 20, 2024
ce4929d
UI changes
martinng01 Oct 20, 2024
c1a3d46
Merge branch 'CS3219-AY2425S1:user-service' into user-service
martinng01 Oct 20, 2024
b303ca7
Implement Matching Service backend with Kafka
zengzihui Oct 20, 2024
7b1d964
Merge pull request #85 from zengzihui/matching-service
zengzihui Oct 20, 2024
861a0d8
Added matching service frontend linked with backend but not tested yet
peiran18 Oct 20, 2024
322bd58
Added matching service frontend linked with backend but not tested yet
peiran18 Oct 20, 2024
ff951f2
Fixed Matching Page
peiran18 Oct 20, 2024
04d20fd
Merge branch 'CS3219-AY2425S1:user-service' into user-service
martinng01 Oct 20, 2024
5488ffa
Merge pull request #87 from martinng01/user-service
martinng01 Oct 20, 2024
1dc28e8
Add functionality for matched try again button
martinng01 Oct 20, 2024
10fe192
Merge pull request #88 from martinng01/user-service
martinng01 Oct 20, 2024
30f6342
Rename button
martinng01 Oct 20, 2024
5297f9a
Merge branch 'user-service' of https://github.com/martinng01/cs3219-a…
martinng01 Oct 20, 2024
834bac1
Merge branch 'CS3219-AY2425S1:user-service' into user-service
martinng01 Oct 20, 2024
b3b4b6a
Merged user and matching service
peiran18 Oct 20, 2024
b72c95d
Minor bug fix
peiran18 Oct 20, 2024
57e6910
Merge branch 'user-service' of https://github.com/CS3219-AY2425S1/cs3…
peiran18 Oct 20, 2024
84da0ce
Merge pull request #89 from peiran18/user-service
peiran18 Oct 20, 2024
1605af8
Resolve merge conflicts
peiran18 Oct 20, 2024
c12d211
Fix docker compose
martinng01 Oct 20, 2024
81fe135
Merge branch 'CS3219-AY2425S1:matching-service' into matching-service
martinng01 Oct 20, 2024
91e8e19
Merge pull request #90 from martinng01/matching-service
martinng01 Oct 20, 2024
624df1c
Merge pull request #91 from martinng01/matching-service
martinng01 Oct 20, 2024
83224f7
Fix frontend bugs
martinng01 Oct 20, 2024
2b33ecc
Merge branch 'CS3219-AY2425S1:matching-service' into matching-service
martinng01 Oct 20, 2024
0bff71c
Update result consumer, timeout consumer, match cancellation consumer.
zengzihui Oct 20, 2024
37b10f9
Update result consumer, timeout consumer, match cancellation consumer.
zengzihui Oct 20, 2024
18d8203
Update kafka broker to correct docker address.
zengzihui Oct 20, 2024
2ca00e4
Merge pull request #92 from zengzihui/matching-service
zengzihui Oct 20, 2024
a6bd508
Merge pull request #93 from martinng01/matching-service
martinng01 Oct 20, 2024
7c93704
Fix difficulty and put username in match request
martinng01 Oct 20, 2024
f042a42
Link frontend and matching service
martinng01 Oct 20, 2024
1df2d62
Merge pull request #94 from martinng01/matching-service
martinng01 Oct 20, 2024
24ce444
Fix bugs
martinng01 Oct 20, 2024
71c7c87
Merge branch 'CS3219-AY2425S1:matching-service' into matching-service
martinng01 Oct 20, 2024
20701e1
update concurrently
czhiruo Oct 21, 2024
23f75cd
Fixed match cancel bug
zengzihui Oct 21, 2024
3c38fd7
Merge pull request #96 from zengzihui/new-matching-service
czhiruo Oct 21, 2024
353ca94
changed routing for request password
czhiruo Oct 21, 2024
bf33bdc
Merge pull request #97 from czhiruo/main
martinng01 Oct 21, 2024
f2dd2bb
Fix multiple cancel requests during matching
martinng01 Oct 22, 2024
da5fb40
Merge pull request #100 from martinng01/matching-service
martinng01 Oct 22, 2024
68e5d0b
Add basic collab service function
martinng01 Oct 23, 2024
5fa9483
Merge pull request #101 from CS3219-AY2425S1/matching-service
zengzihui Oct 24, 2024
32a09d2
Merge branch 'CS3219-AY2425S1:collab-service' into collab-service
martinng01 Oct 25, 2024
2f5f0ca
Merge pull request #102 from martinng01/collab-service
martinng01 Oct 25, 2024
dfc1f96
Added Collaboration Page ui with code editor
peiran18 Oct 27, 2024
3b352d6
Added Collaboration Page ui with question in markdown format
peiran18 Oct 27, 2024
c576b6d
Fixed ui bugs for Collaboration Page
peiran18 Oct 27, 2024
fb7f770
Updated Collaboration Page ui to make backend integration easier
peiran18 Oct 27, 2024
ddc7ead
Merge pull request #103 from peiran18/collab-service
peiran18 Oct 27, 2024
0f9ce4c
Updated Collaboration Page ui to change programming language environm…
peiran18 Oct 27, 2024
8c3977a
Merge pull request #105 from peiran18/collab-service
peiran18 Oct 27, 2024
7f0ebc3
Fixed matching service sending same userId to both users
martinng01 Oct 27, 2024
cdcce75
Integrated basic working collab
martinng01 Oct 27, 2024
b344ad3
Merge pull request #107 from martinng01/collab-service
martinng01 Oct 28, 2024
4305a25
Merge branch 'CS3219-AY2425S1:collab-service' into collab-service
martinng01 Oct 29, 2024
d79f6b5
Merge pull request #108 from martinng01/collab-service
martinng01 Oct 29, 2024
27bf40e
Set editor readonly when collaborator is typing
martinng01 Oct 29, 2024
a2f7223
Added overlay for blocking code editor when other user is typing to C…
peiran18 Oct 29, 2024
3dc2422
Merge pull request #109 from peiran18/collab-service
peiran18 Oct 29, 2024
a74fe53
Fix bug of editor always locked
martinng01 Oct 29, 2024
dc99377
Merge pull request #110 from martinng01/collab-service
martinng01 Oct 29, 2024
f4c812b
Fix conlicts
martinng01 Oct 29, 2024
bf57837
Update Room model
martinng01 Oct 29, 2024
850cf03
Add templates for different languages
martinng01 Oct 29, 2024
beccb58
Integrated collab service with frontend, removed hardcode
martinng01 Oct 29, 2024
05510a9
Add redirection to room
martinng01 Oct 30, 2024
6a4b4cb
Fix bug if more than same user is registered to collab service
martinng01 Oct 30, 2024
4874a1b
Merge branch 'CS3219-AY2425S1:collab-service' into collab-service
martinng01 Oct 30, 2024
07613da
Merge pull request #111 from martinng01/collab-service
martinng01 Oct 30, 2024
cd947ed
Implemented redis (#112)
martinng01 Nov 2, 2024
2a91bfc
Implemented redis
martinng01 Nov 2, 2024
02a3574
Merge branch 'collab-service' of https://github.com/martinng01/cs3219…
martinng01 Nov 2, 2024
52a7e55
Updated question description to accept and preview markdown format data
zengzihui Nov 2, 2024
4f0b4c1
Update ui for question details page
zengzihui Nov 2, 2024
bc83e04
created yaml files for kubernetes deployment
czhiruo Nov 3, 2024
e1c82de
Merge pull request #113 from czhiruo/collab-service
czhiruo Nov 3, 2024
e66f5e1
Merge branch 'CS3219-AY2425S1:collab-service' into collab-service
martinng01 Nov 3, 2024
6dd2d45
Moved roomManager class to services folder
martinng01 Nov 3, 2024
04220e8
Add exiting collab page causes other user to disconnect
martinng01 Nov 3, 2024
615c95c
Merge branch 'collab-service' of https://github.com/martinng01/cs3219…
martinng01 Nov 3, 2024
f92d9ac
Added feature where question is added to history on exit
martinng01 Nov 4, 2024
2084fc4
Merge pull request #115 from martinng01/collab-service
martinng01 Nov 4, 2024
84804f5
Implement displaying of the matching status of both users
zengzihui Nov 4, 2024
a94afdc
Generate question upon acceptance from both user and notify collab-se…
zengzihui Nov 4, 2024
cd85a61
Fixing generate question bug
zengzihui Nov 4, 2024
ab5e049
Solve conflicts for merging
zengzihui Nov 4, 2024
0058eea
Link matching service to collab service.
zengzihui Nov 4, 2024
98a589c
Merge pull request #116 from zengzihui/milestone-5
zengzihui Nov 4, 2024
b792b9e
Fix collab service
martinng01 Nov 5, 2024
7530c6b
Merge pull request #117 from martinng01/collab-service
martinng01 Nov 5, 2024
575cc74
Add Redis to matching service
zengzihui Nov 5, 2024
8aa3695
Merge remote-tracking branch 'upstream/collab-service' into milestone-5
zengzihui Nov 5, 2024
f393edb
Solve conflicts
zengzihui Nov 5, 2024
58ebde1
Convert Redis to store user socket map.
zengzihui Nov 5, 2024
97e1bf6
Updated Collaboration Service to have a chatbot for real time communi…
peiran18 Nov 6, 2024
6effc8e
Merge branch 'collab-service' of https://github.com/CS3219-AY2425S1/c…
peiran18 Nov 6, 2024
98ad60a
Fixed duplicate message bug for collab service
peiran18 Nov 6, 2024
3721294
Convert in memory UserSocketMap in Matching Service to Redis
zengzihui Nov 6, 2024
c00606b
Updated ui for collaboration chat service
peiran18 Nov 6, 2024
8dce722
Merge pull request #121 from peiran18/collab-service
peiran18 Nov 6, 2024
80f6c71
Extract Question Details as a component to share.
zengzihui Nov 6, 2024
2578ecb
Update Question Details to tailwindcss
zengzihui Nov 7, 2024
9901c27
Add back package-lock.json file back
zengzihui Nov 7, 2024
2c92610
Resolve merge conflict from chatbot
zengzihui Nov 7, 2024
076421f
Merge pull request #122 from zengzihui/milestone-5
zengzihui Nov 7, 2024
173d04d
Increase Kafka connection retry count
martinng01 Nov 7, 2024
128e3b7
Change log level of kafka consumers
martinng01 Nov 7, 2024
438e976
Merge pull request #123 from martinng01/collab-service
martinng01 Nov 7, 2024
603451e
Fix collab not exiting room for other user when navigating using URL
martinng01 Nov 7, 2024
ac53450
Merge pull request #126 from martinng01/collab-service
martinng01 Nov 7, 2024
cadc1e0
Add exit button for room
martinng01 Nov 7, 2024
232c806
Merge branch 'CS3219-AY2425S1:collab-service' into collab-service
martinng01 Nov 7, 2024
1bc190c
Added username to Header
peiran18 Nov 8, 2024
c34f96b
Merge pull request #128 from peiran18/collab-service
peiran18 Nov 8, 2024
2e5fef7
Merge pull request #129 from CS3219-AY2425S1/collab-service
peiran18 Nov 8, 2024
c3ec811
Updates functionality for HistoryPage.js, try-block for Controller.ts…
Nov 10, 2024
2b12ae7
Update controllers.ts
minghowC Nov 10, 2024
3f1345b
Delete backend/question-service/src/controllers/controllers.ts
minghowC Nov 10, 2024
0355830
Update HistoryPage.js
minghowC Nov 10, 2024
71ca955
Updates question_branch2
Nov 10, 2024
ab31468
Merge remote-tracking branch 'origin/question_branch2' into question_…
Nov 10, 2024
385ae3a
Restores controllers.ts from origin/main
Nov 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/.keep
Empty file.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
node_modules/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Review Assignment Due Date](https://classroom.github.com/assets/deadline-readme-button-22041afd0340ce965d47ae6ef1cefeee28c7c493a6346c4f15d667ab976d596c.svg)](https://classroom.github.com/a/bzPrOe11)
# CS3219 Project (PeerPrep) - AY2425S1
## Group: Gxx

Expand Down
1 change: 1 addition & 0 deletions backend/collab-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KAFKA_BROKERS='kafka:9092'
3 changes: 3 additions & 0 deletions backend/collab-service/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.env
16 changes: 16 additions & 0 deletions backend/collab-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:20-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 8888

RUN npm run build

CMD ["npm", "start"]

10 changes: 10 additions & 0 deletions backend/collab-service/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
module.exports = {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},
testMatch: ["**/tests/**/*.test.ts"],
// Exclude build directories and node_modules
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: collab-service-configmap
namespace: peerprep-collab-service
data:
KAFKA_BROKERS: "kafka:9092"
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: collab-service
namespace: peerprep-collab-service
spec:
replicas: 1
selector:
matchLabels:
app: collab-service
template:
metadata:
labels:
app: collab-service
spec:
containers:
- name: collab-service
image: cpauzi/collab-service:latest
ports:
- containerPort: 8081
envFrom:
- configMapRef:
name: collab-service-configmap
resources:
requests:
cpu: "200m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: collab-service-hpa
namespace: peerprep-collab-service
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: collab-service
minReplicas: 1
maxReplicas: 4
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: peerprep-collab-service
13 changes: 13 additions & 0 deletions backend/collab-service/kubernetes-deployment/collab-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: collab-service
namespace: peerprep-collab-service
spec:
selector:
app: collab-service
ports:
- protocol: TCP
port: 8081
targetPort: 8081
type: ClusterIP # Use 'NodePort' if you want to expose the service externally
Loading