-
Notifications
You must be signed in to change notification settings - Fork 2
Docker環境の最適化 #1037
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
Docker環境の最適化 #1037
Conversation
…for improved build efficiency
Summary of ChangesHello @TkymHrt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、開発環境のセットアップ時間を短縮し、本番環境との整合性を高めるためにDocker環境を最適化することを目的としています。軽量なベースイメージの採用、キャッシュの永続化、コンテナ内のユーザー権限の調整、およびビルドプロセスの簡素化を通じて、開発体験とデプロイの信頼性を向上させます。また、本番環境のイメージも最新化され、ローカルでの検証プロセスも改善されています。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
このプルリクエストは、Docker環境を最適化し、開発ビルドの高速化と本番環境との整合性向上を目指すもので、全体として素晴らしい改善だと感じました。
主な変更点として、軽量なalpineイメージの採用、非rootユーザーでのコンテナ実行による権限問題の解消、名前付きボリュームを利用したキャッシュによるビルド高速化など、多くのベストプラクティスが取り入れられています。特に、開発体験の向上に大きく寄与する変更だと思います。
コード全体を確認し、更なる改善のための提案をいくつかコメントしました。特に、本番用APIイメージのビルドキャッシュ効率化に関する提案は、ビルド時間の短縮に繋がるため、ご確認いただけると幸いです。
素晴らしいお仕事です!
Deploying finansu with
|
| Latest commit: |
2b6dceb
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://80503466.finansu.pages.dev |
| Branch Preview URL: | https://refactor-optimize-docker.finansu.pages.dev |
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.
ビルド時のネットワーク問題でフォントが引っかかるので、ローカルフォントに変更しました。
prdでbuildにめっちゃ時間かかる問題とか解決したりするのかな
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.
フォント関係でタイムアウト待ちしなくなるので、改善されているかもです!
Kubosaka
left a comment
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.
対応ありがとう!
対応Issue
https://nut-m-e-g.slack.com/archives/C020WQ3GY07/p1768051810911529
概要
開発開始までのビルド時間の短縮、および本番環境との整合性を高めるためにDocker環境の最適化をしました。
主な変更点
golang:1.25.5-alpine,node:24-alpine)pnpm-storeやgo-cacheを名前付きボリュームで永続化し、キャッシュを有効活用make build-stg,make run-prodが正常に動作するように修正画面スクリーンショット等
テスト項目
make build->make runで開発環境が起動し、API/Viewが正常に動作することapi/tmpやview/.next等)の所有者がホストユーザーになっていることpnpm installやgo buildが2回目以降高速化されていること(キャッシュ確認)make build-stgが成功することdocker compose -f compose.prod.yml buildが成功することdocker compose -f compose.local-prod.yml buildが成功すること備考
ビルド時のネットワーク問題でフォントが引っかかるので、ローカルフォントに変更しました。