Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help install setup_husky clean lint lint_text format format_check before_commit before-commit start test test_coverage dev build start-all stop-all restart-all setup-keycloak check-docker docker-build docker-run docker-stop
.PHONY: help install setup_husky clean lint lint_text format format_check before_commit before-commit start test test_coverage dev build start-all stop-all restart-all setup-keycloak check-docker docker-build docker-run docker-stop docker-status

# デフォルトターゲットはhelp
default: help
Expand Down Expand Up @@ -138,6 +138,23 @@ docker-stop:
@echo "✅ 停止しました"
@echo ""

docker-status: check-docker
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo "🐳 Docker コンテナの起動状態"
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo ""
@echo "📦 Keycloak コンテナ:"
@cd infrastructure/docker/keycloak && docker compose ps || echo " ❌ Keycloak コンテナが見つかりません"
@echo ""
@echo "📦 Control Plane UI コンテナ:"
@cd frontend/control-plane && docker compose ps || echo " ❌ Control Plane UI コンテナが見つかりません"
@echo ""
@echo "🌐 すべての実行中コンテナ:"
@docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" || echo " ❌ 実行中のコンテナがありません"
@echo ""
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo ""

help:
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo "📖 TenkaCloud Makefile ヘルプ"
Expand All @@ -154,6 +171,7 @@ help:
@echo " make docker-build Control Plane UI の Docker イメージをビルド"
@echo " make docker-run Docker Compose で Control Plane UI を起動"
@echo " make docker-stop Docker Compose を停止"
@echo " make docker-status Docker コンテナの起動状態を表示"
@echo ""
@echo "📦 パッケージ管理:"
@echo " make install bun パッケージをインストール"
Expand Down
29 changes: 29 additions & 0 deletions Plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,35 @@ Next.js 16 の仕様変更により、middleware ファイル名が変更され

---

### Makefile 改善: Docker ステータス確認コマンドの追加 - 2025-11-20

**目的 (Objective)**:
- 開発者が Docker コンテナの起動状態を一目で確認できるようにする
- `make docker-status` コマンドを追加し、Keycloak と Control Plane UI の状態を表示する
- ドキュメント (`docs/QUICKSTART.md`) を更新し、新しいコマンドの使用方法を記載する

**制約 (Guardrails)**:
- 既存の `check-docker` ターゲットを活用する
- 見やすいフォーマットで出力する
- `CLAUDE.md` のコンテキストを理解し、ドキュメント更新を徹底する

**タスク (TODOs)**:
- [x] Makefile に `docker-status` ターゲットを追加
- [x] Makefile の help に `docker-status` を追加
- [x] `docs/QUICKSTART.md` に `make docker-status` の説明を追加
- [x] 動作確認

**検証手順 (Validation)**:
- `make docker-status` を実行し、コンテナの状態が表示されることを確認
- `make help` に新しいコマンドが表示されることを確認

**進捗ログ (Progress Log)**:
- [2025-11-20 08:58] Makefile に `docker-status` コマンドを追加完了
- [2025-11-20 09:00] `docs/QUICKSTART.md` の更新に着手
- [2025-11-20 09:05] `docs/QUICKSTART.md` に `make docker-status` の説明を追加完了

---

## 次の実行計画テンプレート

以下のテンプレートを使用して、新しい機能開発の実行計画を作成してください:
Expand Down
17 changes: 17 additions & 0 deletions docs/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,16 @@ docker ps
# エラーが出る場合は Docker Desktop を再起動
```

### コンテナの状態を確認する

起動中のコンテナの状態を一括で確認するには、以下のコマンドを使用します。

```bash
make docker-status
```

これにより、Keycloak、Control Plane UI、およびその他の実行中のコンテナの状態が表示されます。

### Keycloak に接続できない

```bash
Expand Down Expand Up @@ -345,6 +355,13 @@ bun run dev

### ログを確認

**コンテナの状態確認**:
```bash
make docker-status
```

**Keycloak**:

**Keycloak**:
Comment on lines +358 to 365

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Formatting inconsistency: duplicate Keycloak heading detected.

Lines 358-361 introduce a "コンテナの状態確認" subsection, but lines 363 and 365 both show "Keycloak:" as a heading, creating redundancy. This appears to be a copy-paste artifact from the section organization.

Suggest removing the duplicate or restructuring the section:

 ### ログを確認
 
-**コンテナの状態確認**:
-```bash
-make docker-status
-```
-
-**Keycloak**:
-**Keycloak**:
-```bash
+**Keycloak**:
+```bash

Alternatively, if you intend to keep both sections, ensure they have distinct purposes or consolidate them.

🤖 Prompt for AI Agents
In docs/QUICKSTART.md around lines 358 to 365 there is a duplicated
"**Keycloak**:" heading (likely a copy-paste artifact) that creates a formatting
inconsistency; remove the duplicate heading and consolidate the block so it
reads a single "**Keycloak**:" heading followed by the intended code block (or,
if two distinct sections are required, rename one to reflect its different
purpose) ensuring proper markdown code fence placement for the bash snippet.

```bash
cd infrastructure/docker/keycloak
Expand Down
Loading