docs(setup): document MinIO media asset seeding commands and validation #3
|
|
@ -75,17 +75,7 @@ docker compose -f docker-compose.dev.yml exec -e ACCUPEDIA_BOOTSTRAP_ADMIN_PASSW
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Step 3.3: Seed Commerce Plans
|
### Step 3.3: Seed Content & Modules
|
||||||
Seeds subscription tiers, billing periods, and pricing from `plans.json`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker compose -f docker-compose.dev.yml exec backend \
|
|
||||||
acupedia-bootstrap commerce
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Step 3.4: Seed Clinical Content & Modules
|
|
||||||
Reads the mounted `/app/content` folder, parses templates, and seeds and publishes all 16 clinical modules (`m0001` through `m0042`):
|
Reads the mounted `/app/content` folder, parses templates, and seeds and publishes all 16 clinical modules (`m0001` through `m0042`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -98,8 +88,60 @@ docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Step 3.5: Validate Database Integrity
|
### Step 3.4: Seed Clinical Media Assets (Images to MinIO)
|
||||||
Verifies all 9 required tables exist, counts roles, permissions, modules, and published content items:
|
Seeds all 787 anatomical images, channel pathways, and charts across the 4 visual modules into MinIO object storage (`accupedia-media` bucket) and links them to their respective content items in PostgreSQL:
|
||||||
|
|
||||||
|
**Option A (Recommended — Automated 1-line loop for all 4 modules):**
|
||||||
|
```bash
|
||||||
|
for m in m0001-acupuncture-points m0002-ear-acupuncture m0003-scalp-acupuncture m0031-nutrition; do
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap media \
|
||||||
|
--manifest /app/content/$m/media.json \
|
||||||
|
--media-root /app/content/$m
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
**Option B (Run module-by-module individually):**
|
||||||
|
```bash
|
||||||
|
# 1. Acupuncture Points (418 images — acupoints, channels, and extraordinary vessels like Chong Mai)
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap media \
|
||||||
|
--manifest /app/content/m0001-acupuncture-points/media.json \
|
||||||
|
--media-root /app/content/m0001-acupuncture-points
|
||||||
|
|
||||||
|
# 2. Ear Acupuncture (336 images — ear reflexology points)
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap media \
|
||||||
|
--manifest /app/content/m0002-ear-acupuncture/media.json \
|
||||||
|
--media-root /app/content/m0002-ear-acupuncture
|
||||||
|
|
||||||
|
# 3. Scalp Acupuncture (18 images — scalp zones)
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap media \
|
||||||
|
--manifest /app/content/m0003-scalp-acupuncture/media.json \
|
||||||
|
--media-root /app/content/m0003-scalp-acupuncture
|
||||||
|
|
||||||
|
# 4. Nutrition (15 images — dietary reference charts)
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap media \
|
||||||
|
--manifest /app/content/m0031-nutrition/media.json \
|
||||||
|
--media-root /app/content/m0031-nutrition
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Step 3.5: Seed Commerce Plans
|
||||||
|
Seeds subscription plans, billing periods, pricing, and links them to the seeded modules from `/app/content/plans.json`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
acupedia-bootstrap commerce --plans /app/content/plans.json
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Step 3.6: Validate Database Integrity
|
||||||
|
Verifies all 9 required tables exist, counts roles, permissions, modules, published content items, and seeded media assets:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose -f docker-compose.dev.yml exec backend \
|
docker compose -f docker-compose.dev.yml exec backend \
|
||||||
|
|
@ -122,7 +164,7 @@ Expected output:
|
||||||
"permission_count": 6,
|
"permission_count": 6,
|
||||||
"module_count": 16,
|
"module_count": 16,
|
||||||
"content_count": 2476,
|
"content_count": 2476,
|
||||||
"media_asset_count": 0,
|
"media_asset_count": 787,
|
||||||
"access_plan_count": 2,
|
"access_plan_count": 2,
|
||||||
"missing_tables": []
|
"missing_tables": []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue