chore: フロントエンドのDocker Compose環境の構築#783
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCaddyfileに3つのサイトブロックとグローバルオプションが追加され、compose.yamlにcaddy、ui、dashboardサービスと関連ボリュームが追加された。 ChangesフロントエンドDocker Compose環境構築
Estimated code review effort: 2 (Simple) | ~10 minutes 関連Issue: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #783 +/- ##
==========================================
+ Coverage 72.42% 72.48% +0.05%
==========================================
Files 43 43
Lines 3881 3881
==========================================
+ Hits 2811 2813 +2
+ Misses 908 907 -1
+ Partials 162 161 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
compose.yaml (2)
3-3: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueイメージタグの固定方針が一貫していません。
caddyはlatest、dashboardはmain(いずれも可変タグ)を使用していますが、uiはコミットハッシュ付きのpreview-446-...タグにピン留めされています。再現性やロールバック容易性のため、タグ運用方針を統一することを推奨します。Also applies to: 33-33, 41-41
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@compose.yaml` at line 3, The image tag usage is inconsistent across the compose services: caddy uses a mutable latest tag while ui is pinned to a commit-specific tag. Update the compose services referenced by caddy, dashboard, and ui to follow one consistent tag strategy, and prefer pinned immutable tags if the goal is reproducible deploys and easier rollbacks.
2-11: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value
caddyにdepends_onがありません。
backend・ui・dashboardへのdepends_onが設定されていないため、これらのコンテナ起動前にcaddyが起動し、初回リクエストでプロキシ先に接続できない可能性があります。Caddy は再試行するため致命的ではありませんが、起動順序を明示した方が安定します。♻️ 提案
caddy: image: caddy:latest restart: unless-stopped ports: - "80:80" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data - caddy_config:/config + depends_on: + - backend + - ui + - dashboard🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@compose.yaml` around lines 2 - 11, Add an explicit depends_on for the caddy service so it starts after backend, ui, and dashboard are available; update the compose.yaml caddy service definition and use the existing service names backend, ui, and dashboard to keep startup order stable and avoid early proxy failures on first requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@compose.yaml`:
- Line 3: The image tag usage is inconsistent across the compose services: caddy
uses a mutable latest tag while ui is pinned to a commit-specific tag. Update
the compose services referenced by caddy, dashboard, and ui to follow one
consistent tag strategy, and prefer pinned immutable tags if the goal is
reproducible deploys and easier rollbacks.
- Around line 2-11: Add an explicit depends_on for the caddy service so it
starts after backend, ui, and dashboard are available; update the compose.yaml
caddy service definition and use the existing service names backend, ui, and
dashboard to keep startup order stable and avoid early proxy failures on first
requests.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 99a7abc3-00eb-4420-85aa-d59b6ba89e23
📒 Files selected for processing (2)
Caddyfilecompose.yaml
|
ありがとうございます。見ます |
caddyのポート番号を変更し、`ui`のタグ指定をmainに変更 Co-authored-by: H1rono_K <54711422+H1rono@users.noreply.github.com>
close #670
compose.yamlにui/dashboard/caddyサービスを追加Caddyfileを追加し、ui.localhost/dashboard.localhost/localhostでリバースプロキシを設定Summary by CodeRabbit
ui.localhost/dashboard.localhost/localhostの3つのアクセス経路を使い分け可能に。/api/v1/*は共通のバックエンドへ自動転送。localhost:3000経由のルーティングを整理し、UI表示とAPIの切り分けがより分かりやすくなりました。