Skip to content

Commit a24d33d

Browse files
authored
Merge pull request #44 from ruiqi7/deployment/docker
Update docker compose
2 parents f095c08 + 26b6c78 commit a24d33d

File tree

3 files changed

+26
-88
lines changed

3 files changed

+26
-88
lines changed

backend/question-service/package-lock.json

Lines changed: 19 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ services:
77
- 3001:3001
88
networks:
99
- peerprep-network
10+
restart: on-failure
1011
question-service:
1112
image: peerprep/question-service
1213
build: ./backend/question-service
1314
env_file: ./backend/question-service/.env
1415
ports:
1516
- 3000:3000
17+
depends_on:
18+
- user-service
1619
networks:
1720
- peerprep-network
21+
restart: on-failure
1822

1923
networks:
2024
peerprep-network:

frontend/src/pages/QuestionList/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const QuestionList: React.FC = () => {
117117

118118
toast.success(SUCCESS_QUESTION_DELETE);
119119
getQuestionCategories(dispatch);
120-
if (state.questionCount % 10 !== 1 || page === 0) {
120+
if (state.questionCount % rowsPerPage !== 1 || page === 0) {
121121
updateQuestionList();
122122
} else {
123123
setPage(page - 1);
@@ -134,8 +134,10 @@ const QuestionList: React.FC = () => {
134134
} else {
135135
updateQuestionList();
136136
}
137+
// eslint-disable-next-line react-hooks/exhaustive-deps
137138
}, [searchFilter, complexityFilter, categoryFilter]);
138139

140+
// eslint-disable-next-line react-hooks/exhaustive-deps
139141
useEffect(() => updateQuestionList(), [page]);
140142

141143
// Check if the user is admin

0 commit comments

Comments
 (0)