Skip to content

Commit 4574203

Browse files
committed
change docker-compose and add husky
1 parent 654a40e commit 4574203

File tree

10 files changed

+5493
-25
lines changed

10 files changed

+5493
-25
lines changed

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm pre-commit

docker-compose.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
version: "3"
21
services:
32
frontend:
3+
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/peerprep-fe:latest
44
build:
55
context: ./peerprep-fe
66
dockerfile: Dockerfile
77
ports:
88
- "3000:3000"
99
environment:
1010
- NODE_ENV=production
11-
12-
# Add other microservices here
13-
# backend:
14-
# ...
15-
# database:
16-
# ...
11+
networks:
12+
- peerprep-network
13+
question-service:
14+
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/question-svc:latest
15+
build:
16+
context: ./question-service
17+
dockerfile: Dockerfile
18+
ports:
19+
- "4001:4001"
20+
environment:
21+
- NODE_ENV=production
22+
- PORT=4001
23+
networks:
24+
- peerprep-network
25+
env_file:
26+
- ./question-service/.env.dev
27+
networks:
28+
peerprep-network:
29+
driver: bridge

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"scripts": {
3+
"pre-commit": "npm run --workspaces pre-commit",
4+
"prepare": "husky"
5+
},
6+
"devDependencies": {
7+
"husky": "^9.1.6"
8+
},
9+
"workspaces": [
10+
"question-service",
11+
"peerprep-fe"
12+
]
13+
}

peerprep-fe/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start -p 3000 -H 0.0.0.0",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"pre-commit": "pnpm lint"
1011
},
1112
"dependencies": {
1213
"@radix-ui/react-dialog": "^1.1.1",

0 commit comments

Comments
 (0)