Skip to content

Feat/kanba/243 introduce schemaspy#244

Open
taminororo wants to merge 14 commits intodevelopfrom
feat/kanba/243-introduce-schemaspy
Open

Feat/kanba/243 introduce schemaspy#244
taminororo wants to merge 14 commits intodevelopfrom
feat/kanba/243-introduce-schemaspy

Conversation

@taminororo
Copy link
Copy Markdown
Collaborator

@taminororo taminororo commented Jan 11, 2026

#243

resolve #243
SchemaSpyによるER図導入のタスクに対応

概要

  • SchemaSpyのイメージのをdocker-compose.yamlファイルに書き込む
  • 実行コマンドをmakefileに記載
  • make schemaspyの実行でapi/docs/schemaspディレクトリにファイルが生成されます
  • 生成されるファイルの量が多すぎたから,ディレクトリを作りました

画面スクリーンショット等

  • URL
    スクリーンショット
relationships real compact relationships real large

テスト項目

  • makeコマンドを実行してER図が作成されるかの確認
  • 生成するディレクトリがここで良いのか確認

備考

Summary by CodeRabbit

  • New Features

    • ローカルでデータベースER図を生成・収集するSchemaSpy統合を追加しました(標準とMac向けの実行手順を含む)。
  • Documentation

    • SchemaSpyの利用手順、出力先や実行コマンド、環境変数による上書き方法をREADMEに追記しました。
  • Chores

    • 自動レビュー言語を日本語に設定し、簡易プロファイルで自動レビューとチャット自動応答を有効化しました。
    • 生成済みER図を無視する設定と、ER図生成用のMakeターゲット/Composeサービスを追加しました。

Copy link
Copy Markdown
Contributor

@uchida189 uchida189 left a comment

Choose a reason for hiding this comment

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

生成は良さそう!
余計なファイルが多いから、そこだけいい感じにしたい!

@taminororo
Copy link
Copy Markdown
Collaborator Author

ER図だけコマンド打ったら残るように変更しました

rm -rf api/docs/schemaspy
rm -rf api/docs/er-diagrams
make schemaspy

で試してみてください
ディレクトリ構造は以下になります

api/docs/er-diagrams/
├── summary/
│   ├── relationships.real.compact.png
│   └── relationships.real.large.png
├── bureaus.1degree.png
├── bureaus.2degrees.png
├── ...
└── years.2degrees.png

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

SchemaSpy を導入して ER 図を生成する機能を追加しました:Compose サービス(mac 含む)と Makefile ターゲットを追加し、出力先・README・.gitignore・リポジトリ設定を更新しています(50語未満)。

Changes

Cohort / File(s) Summary
リポジトリ設定
\.coderabbit\.yaml
レビュー言語を ja-JP に設定し、reviews.profile: chillreviews.auto_review.enabled: truechat.auto_reply: true を追加。
無視設定
\.gitignore
api/docs/er-diagrams/*api/docs/schemaspy/(SchemaSpy 出力)を ignore に追加。
Compose 定義
docker-compose\.yml, docker-compose\.mac\.yml
schemaspy サービスを追加(schemaspy/schemaspy:latestcontainer_name: nutfes-seeft-schemaspy、接続環境変数、./api/docs/schemaspy:/output マウント、depends_onservice_healthyprofiles: [tools] 等を設定)。db サービスに PostgreSQL 用 healthcheck を追加。
Makefile
Makefile
.PHONY ターゲット schemaspymac-schemaspy を追加:一時 api/docs/schemaspy を作成して Compose で SchemaSpy を実行、生成 PNG を api/docs/er-diagrams/ にコピー(relationships.real.* を除外)、summary/ に要約画像を配置し一時ディレクトリを削除する処理を追加。
ドキュメント
README\.md
SchemaSpy 利用手順を追記:出力パス、make schemaspy / make mac-schemaspy 実行方法、接続情報を環境変数で上書き可能である旨を記載。

Sequence Diagram(s)

sequenceDiagram
  actor 開発者 as 開発者
  participant Make as Makefile
  participant DC as DockerCompose
  participant SS as SchemaSpyコンテナ
  participant DB as PostgreSQL
  participant FS as ファイルシステム

  開発者->>Make: make schemaspy / make mac-schemaspy を実行
  Make->>DC: docker compose run --rm schemaspy
  DC->>SS: コンテナ起動 (env, mount を渡す)
  SS->>DB: DBへ接続 (host/port/db/user/password, schema)
  SS->>FS: /output に ER 図 (PNG 等) を出力 (api/docs/schemaspy)
  Make->>FS: 生成画像をフィルタして api/docs/er-diagrams/ と summary/ にコピー
  Make-->>開発者: "ER diagrams saved to api/docs/er-diagrams/"
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰
コンテナ跳ねてスキーマ見に行く、
テーブル線がぴょんとつながる、
PNG がぽんと並ぶよ、
docs に光る小道標、
さあ覗いてごらん、ぴょん!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive Issue #243はER図生成に関する複数の目標(Mermaid/Graphviz使用、色分けによる視認性改善、documentation作成など)を定義しており、PR実装との関連性が明確でない。 Issue #243で要求された主要目標(Mermaid/Graphvizによるコード化、色分けスキーム、テーブル解説ドキュメント)との対応関係を明確にすること。
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed タイトルはPR全体の主な変更内容(SchemaSpy導入)を明確かつ簡潔に反映しており、チェンジセット内容と関連している。
Description check ✅ Passed 説明はテンプレートの主要セクション(対応Issue、概要、スクリーンショット、テスト項目)を含んでおり、変更内容が十分に文書化されている。
Out of Scope Changes check ✅ Passed 変更内容はSchemaSpy導入に関連する設定変更(docker-compose、Makefile、README、.gitignore、.coderabbit.yaml)に限定されており、スコープ外の変更は認められない。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/kanba/243-introduce-schemaspy

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
Makefile (1)

88-109: Refactor duplicated SchemaSpy targets into one parameterized recipe.

Both targets repeat the same body; this already trips checkmake’s max body-length warning and makes future fixes easy to miss in one target.

♻️ Example refactor
+.PHONY: schemaspy mac-schemaspy _schemaspy-run
+
 schemaspy:
-	mkdir -p api/docs/schemaspy
-	docker compose run --rm schemaspy
-	mkdir -p api/docs/er-diagrams/summary
-	find api/docs/schemaspy/diagrams -name '*.png' ! -name 'relationships.real.*' -exec cp {} api/docs/er-diagrams/ \;
-	cp api/docs/schemaspy/diagrams/summary/relationships.real.compact.png api/docs/er-diagrams/summary/
-	cp api/docs/schemaspy/diagrams/summary/relationships.real.large.png api/docs/er-diagrams/summary/
-	rm -rf api/docs/schemaspy
-	`@echo` "ER diagrams saved to api/docs/er-diagrams/"
+	$(MAKE) _schemaspy-run COMPOSE_ARGS=""
 
 .PHONY: mac-schemaspy
 mac-schemaspy:
-	mkdir -p api/docs/schemaspy
-	docker compose run --rm schemaspy
-	mkdir -p api/docs/er-diagrams/summary
-	find api/docs/schemaspy/diagrams -name '*.png' ! -name 'relationships.real.*' -exec cp {} api/docs/er-diagrams/ \;
-	cp api/docs/schemaspy/diagrams/summary/relationships.real.compact.png api/docs/er-diagrams/summary/
-	cp api/docs/schemaspy/diagrams/summary/relationships.real.large.png api/docs/er-diagrams/summary/
-	rm -rf api/docs/schemaspy
-	`@echo` "ER diagrams saved to api/docs/er-diagrams/"
+	$(MAKE) _schemaspy-run COMPOSE_ARGS="-f docker-compose.mac.yml"
+
+_schemaspy-run:
+	mkdir -p api/docs/schemaspy
+	docker compose $(COMPOSE_ARGS) run --rm schemaspy
+	mkdir -p api/docs/er-diagrams/summary
+	find api/docs/schemaspy/diagrams -name '*.png' ! -name 'relationships.real.*' -exec cp {} api/docs/er-diagrams/ \;
+	cp api/docs/schemaspy/diagrams/summary/relationships.real.compact.png api/docs/er-diagrams/summary/
+	cp api/docs/schemaspy/diagrams/summary/relationships.real.large.png api/docs/er-diagrams/summary/
+	rm -rf api/docs/schemaspy
+	`@echo` "ER diagrams saved to api/docs/er-diagrams/"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 88 - 109, The two PHONY targets schemaspy and
mac-schemaspy duplicate the same recipe; refactor by centralizing the body into
a single parameterized target (e.g., schemaspy) and make mac-schemaspy a thin
wrapper that invokes it with a variable (e.g., PLATFORM=mac or USE_MAC=1) or by
using a generic pattern rule so the shared steps (mkdir, docker compose run,
find/cp, cleanup, echo) live only once; update the Makefile so mac-schemaspy
simply delegates to schemaspy (passing the variable) and remove the duplicated
block to satisfy checkmake and keep future changes in one place.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.coderabbit.yaml:
- Line 3: The reviews.profile entry uses an invalid enum value "concise"; update
the reviews.profile key in .coderabbit.yaml (the profile value) to one of the
allowed values ("chill" or "assertive") so the file passes schema
validation—replace "concise" with the correct option that matches the intended
behavior.

In @.gitignore:
- Around line 31-32: The .gitignore currently ignores "schemaspy/" at repo root
but not the actual generated temp directory "api/docs/schemaspy"; update
.gitignore to ignore the real path used by SchemaSpy (e.g., add
"api/docs/schemaspy/" or a more general pattern like "**/schemaspy/") so the
generated artifacts under api/docs/schemaspy are consistently ignored; ensure
you reference the existing "schemaspy/" entry and remove or keep it as redundant
if you add a recursive pattern.

In `@docker-compose.mac.yml`:
- Around line 46-61: The schemaspy service is always started in
docker-compose.mac.yml; match docker-compose.yml by gating the schemaspy service
behind the tools profile so it’s tool-scoped only. Update the schemaspy service
block (service name "schemaspy") to include a service-level profiles key (e.g.,
profiles: ["tools"]) so it only runs when the tools profile is selected, keeping
the existing environment, volumes and command intact.

In `@Makefile`:
- Around line 99-103: The mac-schemaspy Makefile target is invoking docker
compose without specifying the mac-specific compose file; update the
mac-schemaspy target (target name mac-schemaspy) so the compose command
explicitly uses the mac file (e.g., change the command to use docker compose -f
docker-compose.mac.yml run --rm schemaspy or otherwise pass the mac compose file
via -f) so it runs against docker-compose.mac.yml; keep the existing mkdir steps
intact.

In `@README.md`:
- Around line 45-55: Update the README to correct the persisted output
directory: replace references to `api/docs/schemaspy` with the actual final
artifact location `api/docs/er-diagrams/`, and clarify that running the `make
schemaspy` (and `make mac-schemaspy`) target removes the temporary
`api/docs/schemaspy` folder and writes the final ER diagram artifacts to
`api/docs/er-diagrams/`; keep mention that connection/auth overrides still come
from the compose env vars (`SCHEMASPY_HOST`, `SCHEMASPY_DB`, etc.).

---

Nitpick comments:
In `@Makefile`:
- Around line 88-109: The two PHONY targets schemaspy and mac-schemaspy
duplicate the same recipe; refactor by centralizing the body into a single
parameterized target (e.g., schemaspy) and make mac-schemaspy a thin wrapper
that invokes it with a variable (e.g., PLATFORM=mac or USE_MAC=1) or by using a
generic pattern rule so the shared steps (mkdir, docker compose run, find/cp,
cleanup, echo) live only once; update the Makefile so mac-schemaspy simply
delegates to schemaspy (passing the variable) and remove the duplicated block to
satisfy checkmake and keep future changes in one place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44863e92-10f9-4160-805b-c0a2d1671d04

📥 Commits

Reviewing files that changed from the base of the PR and between 0214be5 and 8ac5c1b.

📒 Files selected for processing (6)
  • .coderabbit.yaml
  • .gitignore
  • Makefile
  • README.md
  • docker-compose.mac.yml
  • docker-compose.yml

Comment thread .coderabbit.yaml Outdated
Comment thread .gitignore Outdated
Comment thread docker-compose.mac.yml
Comment thread Makefile
Comment on lines +99 to +103
.PHONY: mac-schemaspy
mac-schemaspy:
mkdir -p api/docs/schemaspy
docker compose run --rm schemaspy
mkdir -p api/docs/er-diagrams/summary
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 | 🟠 Major

mac-schemaspy is using the wrong Compose file.

Line 102 runs against the default compose file, so make mac-schemaspy does not actually use docker-compose.mac.yml.

🔧 Proposed fix
 .PHONY: mac-schemaspy
 mac-schemaspy:
 	mkdir -p api/docs/schemaspy
-	docker compose run --rm schemaspy
+	docker compose -f docker-compose.mac.yml run --rm schemaspy
 	mkdir -p api/docs/er-diagrams/summary
 	find api/docs/schemaspy/diagrams -name '*.png' ! -name 'relationships.real.*' -exec cp {} api/docs/er-diagrams/ \;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 99 - 103, The mac-schemaspy Makefile target is
invoking docker compose without specifying the mac-specific compose file; update
the mac-schemaspy target (target name mac-schemaspy) so the compose command
explicitly uses the mac file (e.g., change the command to use docker compose -f
docker-compose.mac.yml run --rm schemaspy or otherwise pass the mac compose file
via -f) so it runs against docker-compose.mac.yml; keep the existing mkdir steps
intact.

Comment thread README.md Outdated
@taminororo
Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

✅ Actions performed

Full review triggered.

@NUTFes NUTFes deleted a comment from coderabbitai bot Apr 16, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (4)
docker-compose.mac.yml (1)

46-61: ⚠️ Potential issue | 🟠 Major

mac用composeでも schemaspy を tools プロファイル配下に揃えてください。

現状は docker-compose.mac.yml だけ通常起動に混ざる構成で、docker-compose.yml と挙動がズレています。

🔧 修正案
   schemaspy:
     container_name: nutfes-seeft-schemaspy
     image: schemaspy/schemaspy:latest
@@
     volumes:
       - ./api/docs/schemaspy:/output
+    profiles:
+      - tools
     command:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker-compose.mac.yml` around lines 46 - 61,
サービス定義「schemaspy」が通常起動側に残っているので、docker-compose.mac.yml の schemaspy
サービスをツール群と同じプロファイルに移動するために、schemaspy サービスブロックに profiles: ["tools"]
を追加して通常起動から切り離してください(サービス名: schemaspy、既存の depends_on、environment、volumes、command
はそのまま維持してください)。これで docker-compose.yml と同様に tools プロファイル経由で起動されるようになります。
README.md (1)

45-45: ⚠️ Potential issue | 🟡 Minor

永続化される出力先の説明が実装とずれています。

Line 45 の記載は一時出力先です。最終生成物は api/docs/er-diagrams/ に保存され、api/docs/schemaspy は処理後に削除されます。

📝 修正案
-- 生成物の出力先: `api/docs/schemaspy`
+- 最終生成物の出力先: `api/docs/er-diagrams/`
+- 一時出力先: `api/docs/schemaspy`(処理後に削除)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 45, README.md currently states the generated output goes
to `api/docs/schemaspy`, but that's a temporary directory; update the
documentation text to state the final generated artifacts are saved to
`api/docs/er-diagrams/` and clarify that `api/docs/schemaspy` is removed after
processing (replace the `api/docs/schemaspy` reference with
`api/docs/er-diagrams/` and add a note about the temporary deletion).
.gitignore (1)

31-32: ⚠️ Potential issue | 🟡 Minor

schemaspy/ だと実際の一時出力先を無視できません。

Line 32 はリポジトリ直下のみ対象ですが、一時生成先は api/docs/schemaspy です(Makefile Line 90, Line 96)。失敗時の生成物取りこぼしを防ぐため、実パスを無視対象にしてください。

🔧 修正案
 # SchemaSpy
-schemaspy/
+api/docs/schemaspy/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.gitignore around lines 31 - 32, .gitignore currently ignores "schemaspy/"
which only matches a top-level directory and misses the actual temporary output
location; update the ignore entry by replacing or adding the repository-relative
directory name used for generated output ("api/docs/schemaspy") so the real
temporary generation directory is excluded and generated artifacts aren’t
accidentally committed.
Makefile (1)

101-102: ⚠️ Potential issue | 🟠 Major

mac-schemaspy が mac 用 Compose ファイルを使っていません。

Line 102 は通常のデフォルト Compose を参照するため、ターゲット名と実行内容が一致していません。

🔧 修正案
 .PHONY: mac-schemaspy
 mac-schemaspy:
 	mkdir -p api/docs/schemaspy
-	docker compose run --rm schemaspy
+	docker compose -f docker-compose.mac.yml run --rm schemaspy
 	mkdir -p api/docs/er-diagrams/summary
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 101 - 102, The mac-specific Makefile target
mac-schemaspy is calling the default compose file but should use the mac Compose
file; update the mac-schemaspy recipe so the docker compose invocation
references the mac compose file (e.g. replace the existing docker compose run
--rm schemaspy with docker compose -f docker-compose.mac.yml run --rm schemaspy
or the appropriate mac-specific -f flags), ensuring the target name
mac-schemaspy matches the compose files it runs.
🧹 Nitpick comments (1)
Makefile (1)

88-108: schemaspy 系ターゲットの重複は共通化すると保守しやすいです。

同一処理が2箇所に分かれており、将来の修正漏れが起きやすいです(今回の mac 側 compose 指定漏れも同系統)。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Makefile` around lines 88 - 108, The two Makefile targets schemaspy and
mac-schemaspy duplicate the same steps; refactor by extracting the common
commands into a single reusable target (e.g., schemaspy-common or a phony target
named schemaspy) and have mac-schemaspy simply depend on or call that target
while only supplying the Mac-specific difference (e.g., additional docker
compose flags or COMPOSE_FILE/DOCKER_COMPOSE_OPTS) to docker compose run --rm;
update targets schemaspy and mac-schemaspy to call the shared target so changes
are maintained in one place and ensure the Mac path passes the correct compose
option.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docker-compose.yml`:
- Around line 65-67: The docker-compose depends_on currently uses condition:
service_started which may run SchemaSpy before PostgreSQL is ready; add a
comprehensive healthcheck to the db service (e.g., run pg_isready or equivalent)
and change the SchemaSpy service's depends_on entry from condition:
service_started to condition: service_healthy so SchemaSpy waits until db
reports healthy; target the depends_on block and the db service definition when
implementing the change.

---

Duplicate comments:
In @.gitignore:
- Around line 31-32: .gitignore currently ignores "schemaspy/" which only
matches a top-level directory and misses the actual temporary output location;
update the ignore entry by replacing or adding the repository-relative directory
name used for generated output ("api/docs/schemaspy") so the real temporary
generation directory is excluded and generated artifacts aren’t accidentally
committed.

In `@docker-compose.mac.yml`:
- Around line 46-61: サービス定義「schemaspy」が通常起動側に残っているので、docker-compose.mac.yml の
schemaspy サービスをツール群と同じプロファイルに移動するために、schemaspy サービスブロックに profiles: ["tools"]
を追加して通常起動から切り離してください(サービス名: schemaspy、既存の depends_on、environment、volumes、command
はそのまま維持してください)。これで docker-compose.yml と同様に tools プロファイル経由で起動されるようになります。

In `@Makefile`:
- Around line 101-102: The mac-specific Makefile target mac-schemaspy is calling
the default compose file but should use the mac Compose file; update the
mac-schemaspy recipe so the docker compose invocation references the mac compose
file (e.g. replace the existing docker compose run --rm schemaspy with docker
compose -f docker-compose.mac.yml run --rm schemaspy or the appropriate
mac-specific -f flags), ensuring the target name mac-schemaspy matches the
compose files it runs.

In `@README.md`:
- Line 45: README.md currently states the generated output goes to
`api/docs/schemaspy`, but that's a temporary directory; update the documentation
text to state the final generated artifacts are saved to `api/docs/er-diagrams/`
and clarify that `api/docs/schemaspy` is removed after processing (replace the
`api/docs/schemaspy` reference with `api/docs/er-diagrams/` and add a note about
the temporary deletion).

---

Nitpick comments:
In `@Makefile`:
- Around line 88-108: The two Makefile targets schemaspy and mac-schemaspy
duplicate the same steps; refactor by extracting the common commands into a
single reusable target (e.g., schemaspy-common or a phony target named
schemaspy) and have mac-schemaspy simply depend on or call that target while
only supplying the Mac-specific difference (e.g., additional docker compose
flags or COMPOSE_FILE/DOCKER_COMPOSE_OPTS) to docker compose run --rm; update
targets schemaspy and mac-schemaspy to call the shared target so changes are
maintained in one place and ensure the Mac path passes the correct compose
option.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 14c96444-e794-4a29-82a1-77aa0a829806

📥 Commits

Reviewing files that changed from the base of the PR and between 0214be5 and 7bd216e.

📒 Files selected for processing (6)
  • .coderabbit.yaml
  • .gitignore
  • Makefile
  • README.md
  • docker-compose.mac.yml
  • docker-compose.yml

Comment thread docker-compose.yml Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
docker-compose.mac.yml (1)

51-66: ⚠️ Potential issue | 🟠 Major

schemaspytools プロファイル配下に戻してください。

mac 側だけ profiles がないため、通常の up で常時対象になります。docker-compose.yml と同様にツール用途へ限定した方が安全です。

🔧 修正案
   schemaspy:
     container_name: nutfes-seeft-schemaspy
     image: schemaspy/schemaspy:latest
@@
     volumes:
       - ./api/docs/schemaspy:/output
+    profiles:
+      - tools
     command:
#!/bin/bash
set -euo pipefail

echo "=== docker-compose.yml (reference) ==="
rg -n -A20 -B2 '^\s*schemaspy:\s*$|^\s*profiles:\s*$|^\s*-\s*tools\s*$' docker-compose.yml

echo
echo "=== docker-compose.mac.yml (current) ==="
rg -n -A20 -B2 '^\s*schemaspy:\s*$|^\s*profiles:\s*$|^\s*-\s*tools\s*$' docker-compose.mac.yml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docker-compose.mac.yml` around lines 51 - 66, The schemaspy service in
docker-compose.mac.yml is currently unconditional and should be limited to the
tools profile like in docker-compose.yml; update the schemaspy service
definition to include a profiles key with "- tools" (i.e., add profiles: [
"tools" ] or profiles: followed by - tools) so it does not start on a normal
docker-compose up on mac, ensuring the service remains accessible under the
tools profile only.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docker-compose.mac.yml`:
- Around line 51-66: The schemaspy service in docker-compose.mac.yml is
currently unconditional and should be limited to the tools profile like in
docker-compose.yml; update the schemaspy service definition to include a
profiles key with "- tools" (i.e., add profiles: [ "tools" ] or profiles:
followed by - tools) so it does not start on a normal docker-compose up on mac,
ensuring the service remains accessible under the tools profile only.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e7d30f8e-aaaf-473d-b31d-46ebea9134ca

📥 Commits

Reviewing files that changed from the base of the PR and between 792136c and 7a59c92.

📒 Files selected for processing (2)
  • docker-compose.mac.yml
  • docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • docker-compose.yml

@taminororo
Copy link
Copy Markdown
Collaborator Author

将来の更新で SchemaSpy と PostgreSQLが非互換になる可能性があるため、docker-compose.yml / docker-compose.mac.yml の両方でpostgres:18 に固定しました。
make schemaspy の再実行で18テーブル分のER図生成を確認済みです

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SeeFTのSchemaSpyを導入するER図を作成する

2 participants