-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#404 Node.js 버전 18로 올리기, #414 GitHub Actions 캐시 사용 #413
Changes from all commits
77123ed
73e3c00
02d8127
c505824
2b55880
bd26b54
6816589
a839177
8367363
8da0013
660a232
b9fa443
8bda357
e55481c
0a72cc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Force Node.js and pnpm versions according to package.json | ||
engine-strict=true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.17.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
FROM node:16-alpine | ||
FROM node:18-alpine | ||
|
||
# Copy repository | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
|
||
# Install curl (for taxi-docker) | ||
RUN apk update && apk add curl | ||
RUN npm install --global [email protected] [email protected] | ||
# Install curl(for taxi-watchtower) and pnpm | ||
RUN apk update && apk add curl && npm install --global [email protected] | ||
|
||
# Install requirements | ||
RUN pnpm i --force --frozen-lockfile | ||
# pnpm fetch does require only lockfile | ||
COPY pnpm-lock.yaml . | ||
|
||
# Note: devDependencies are not fetched | ||
RUN pnpm fetch --prod | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pnpm fetch 명령어는 lockfile만으로도 의존성을 virtual store( |
||
|
||
# Copy repository and install dependencies | ||
ADD . ./ | ||
RUN pnpm install --offline --prod | ||
|
||
# Run container | ||
EXPOSE 80 | ||
ENV PORT 80 | ||
CMD ["pnpm", "run", "serve"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,22 @@ | |
"name": "taxi-back", | ||
"version": "1.0.0", | ||
"description": "KAIST Taxi Party Matching Web Service", | ||
"author": "sparcs/taxi", | ||
"license": "MIT", | ||
"main": "app.js", | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"start": "cross-env TZ='Asia/Seoul' npx nodemon app.js", | ||
"test": "npm run sample && cross-env TZ='Asia/Seoul' npm run mocha", | ||
"mocha": "cross-env TZ='Asia/Seoul' NODE_ENV=test mocha --recursive --reporter spec --exit", | ||
"serve": "cross-env TZ='Asia/Seoul' NODE_ENV=production node app.js", | ||
"lint": "npx eslint --fix .", | ||
"sample": "cd sampleGenerator && npm start && cd .." | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0", | ||
"pnpm": ">=8.0.0" | ||
}, | ||
Comment on lines
+17
to
+20
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 크.. 버전업 고생하셨습니다 :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 히히 다른 의존성 안 올려도 바로 잘 돌아가더라구요 ㅎㅎ 옛날엔 이슈가 많았던 것 같은데 다행이었습니다.. |
||
"dependencies": { | ||
"@adminjs/express": "^5.1.0", | ||
"@adminjs/mongoose": "^3.0.3", | ||
|
@@ -22,12 +37,12 @@ | |
"eslint-config-prettier": "^8.3.0", | ||
"express": "^4.17.1", | ||
"express-formidable": "^1.2.0", | ||
"express-rate-limit": "^6.6.0", | ||
"express-rate-limit": "^7.1.0", | ||
"express-session": "^1.17.3", | ||
"express-validator": "^6.14.0", | ||
"firebase-admin": "^11.4.1", | ||
"jsonwebtoken": "^8.5.1", | ||
"mongoose": "^6.11.3", | ||
"jsonwebtoken": "^9.0.2", | ||
"mongoose": "^6.12.0", | ||
"node-cron": "3.0.2", | ||
"node-mocks-http": "^1.12.1", | ||
"querystring": "^0.2.1", | ||
|
@@ -40,22 +55,11 @@ | |
"winston-daily-rotate-file": "^4.7.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "*", | ||
"chai": "^4.3.10", | ||
"eslint": "^8.22.0", | ||
"eslint-plugin-mocha": "^10.1.0", | ||
"mocha": "*", | ||
"nodemon": "^2.0.14", | ||
"mocha": "^10.2.0", | ||
"nodemon": "^3.0.1", | ||
"supertest": "^6.2.4" | ||
}, | ||
"scripts": { | ||
"preinstall": "npx only-allow pnpm", | ||
"start": "cross-env TZ='Asia/Seoul' npx nodemon app.js", | ||
"test": "npm run sample && cross-env TZ='Asia/Seoul' npm run mocha", | ||
"mocha": "cross-env TZ='Asia/Seoul' NODE_ENV=test mocha --recursive --reporter spec --exit", | ||
"serve": "cross-env TZ='Asia/Seoul' NODE_ENV=production node app.js", | ||
"lint": "npx eslint --fix .", | ||
"sample": "cd sampleGenerator && npm start && cd .." | ||
}, | ||
"author": "sparcs/taxi", | ||
"license": "MIT" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 캐시 도입이 되면 빌드가 훨씬 빨라지겠네요 :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다! 배포가 더 빨라질 수 있어 기대돼요 ㅎㅎ