Local evaluation

まず、local stackと最小sampleを通す。

深い設計文書を読む前に、起動、health、metadata sync、reference compare までを一度確認します。ここでは default の local MariaDB config store を使う最短経路を扱います。

前提

Docker / Docker Compose、GNU Make、host PHP CLI を使える環境を想定します。初回は image pull と build に数分かかることがあります。

Two separate choices

2つのDBを分けて決める。

DegoDB自身の設計metadataの保存先と、DegoDBがimport・生成対象として扱うuser/business DBは別です。

Design metadata

Config store

個人の軽量利用はfolder-backed SQLite、試用はlocal Docker MariaDB volume、team利用はmanaged MySQL / MariaDB serverを選びます。

Application schema

User database

既存MySQL / MariaDB、local Lab DB、または後で準備するDBのどれをsource / target schemaとして扱うか決めます。

01

Prepare and start

環境ファイルを作り、local stackを起動する。

make up-mtool の最後に表示される access URL と stub login 情報を正として使います。

make env
make up-mtool
02

Health

admin・lab・config DBを確認する。

health が返り、config DB schema が current なら次へ進みます。

make ps-mtool
make health-mtool
make config-db-preflight-mtool
03

Canonical sync

DB構造からDBAccessまでの主線を流す。

schema import、canonical metadata、DataClass、DBAccess のつながりを確認します。

make mtool-canonical-sync
04

Tutorial gate

最小sampleをreference outputと比較する。

sample01 は import / sync / output / reference compare を通す最小 tutorial gate です。

make sample01-pack-runtime-test

Choose the next proof

確認したい成果物に進む。

DBAccess CRUDmake sample10-pack-runtime-test
HTML Source Outputmake sample11-pack-runtime-test
OpenAPI surfacemake sample13-pack-runtime-test
Project metadata bundlemake sample15-pack-runtime-test
Multi-output capstonemake sample17-pack-runtime-test
User DB contractmake user-db-contract-test

Lightweight profile

config DB serverなしで試す。

DegoDB自身の設計metadataだけをSQLite file storeへ置き、user / Lab DBは別に保ちます。

APP_CONFIG_STORE_DIR=work/config-store make up-mtool-lite
make health-mtool-lite
make config-db-preflight-mtool-lite

Stop safely

確認後は停止する。

stop はコンテナを停止します。volume も消す reset は、設計データを失ってよい fresh start の場合だけ使います。

make stop-mtool

# コンテナとnetworkを削除
make down-mtool