-
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
Conversation
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
|
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.
감사합니다! 배포가 더 빨라질 수 있어 기대돼요 ㅎㅎ
"engines": { | ||
"node": ">=18.0.0", | ||
"pnpm": ">=8.0.0" | ||
}, |
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.
히히 다른 의존성 안 올려도 바로 잘 돌아가더라구요 ㅎㅎ 옛날엔 이슈가 많았던 것 같은데 다행이었습니다..
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.
LGTM! 고생많으셨습니다 ~~ :D
@@ -5,6 +5,10 @@ const limiter = rateLimit({ | |||
max: 1500, // Limit each IP to 1500 requests per `window` (here, per 15 minutes) | |||
standardHeaders: true, // Return rate limit info in the `RateLimit-*` headers | |||
legacyHeaders: false, // Disable the `X-RateLimit-*` headers | |||
validate: { | |||
default: true, | |||
trustProxy: false, // Disable the validation error caused by 'trust proxy' set to true |
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.
Nginx를 리버스 프록시로 사용할 경우 trustProxy validation을 꺼도 문제 없습니다.
몇몇 리버스 프록시의 경우 문제가 될 수 있는데, https://github.com/express-rate-limit/express-rate-limit/wiki/Troubleshooting-Proxy-Issues 에 자세하게 설명이 되어 있습니다.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm fetch 명령어는 lockfile만으로도 의존성을 virtual store(node_modules/.pnpm
디렉토리)에 저장할 수 있습니다. lockfile이 바뀌지 않는 이상, package.json의 내용(taxi-back 패키지 버전, 커맨드 등)이 바뀌어도 image layer가 유효합니다.
참조: https://pnpm.io/cli/fetch
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v3 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
|
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.
감사합니다! 배포가 더 빨라질 수 있어 기대돼요 ㅎㅎ
"engines": { | ||
"node": ">=18.0.0", | ||
"pnpm": ">=8.0.0" | ||
}, |
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.
히히 다른 의존성 안 올려도 바로 잘 돌아가더라구요 ㅎㅎ 옛날엔 이슈가 많았던 것 같은데 다행이었습니다..
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.
👍 수고하셨습니다
많이 고치셨네요 ㅋㅋㅋ
Summary
It closes #404
It closes #414 - 위 이슈를 해결할 때 Dockerfile 수정이 필요했어서, 하는 김에 같이 작업했습니다.
Extra info
이 PR 머지 이후 GitHub Actions Secret에서 "FRONT_URL"을 안전하게 삭제할 수 있습니다(저는 권한이 없어요 ㅠ).
Images or Screenshots
Further Work