feat(ops): add media seeding step and configure presigned media endpoint #2
|
|
@ -88,7 +88,49 @@ docker compose -f docker-compose.dev.yml exec backend \
|
|||
|
||||
---
|
||||
|
||||
### Step 3.4: Seed Commerce Plans
|
||||
### Step 3.4: Seed Clinical Media Assets (Images to MinIO)
|
||||
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
|
||||
|
|
@ -98,8 +140,13 @@ docker compose -f docker-compose.dev.yml exec backend \
|
|||
|
||||
---
|
||||
|
||||
<<<<<<< HEAD
|
||||
### Step 3.6: Validate Database Integrity
|
||||
Verifies all 9 required tables exist, counts roles, permissions, modules, published content items, and seeded media assets:
|
||||
=======
|
||||
### Step 3.5: Validate Database Integrity
|
||||
Verifies all 9 required tables exist, counts roles, permissions, modules, and published content items:
|
||||
>>>>>>> origin/main
|
||||
|
||||
```bash
|
||||
docker compose -f docker-compose.dev.yml exec backend \
|
||||
|
|
@ -122,7 +169,7 @@ Expected output:
|
|||
"permission_count": 6,
|
||||
"module_count": 16,
|
||||
"content_count": 2476,
|
||||
"media_asset_count": 0,
|
||||
"media_asset_count": 787,
|
||||
"access_plan_count": 2,
|
||||
"missing_tables": []
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ services:
|
|||
# ============================================================
|
||||
backend:
|
||||
build:
|
||||
context: ${ACUPEDIA_API_PATH:-../acupedia_api}
|
||||
context: ${ACUPEDIA_API_PATH:-../../acupedia-api}
|
||||
dockerfile: Dockerfile
|
||||
container_name: acupedia-api
|
||||
restart: unless-stopped
|
||||
|
|
@ -97,7 +97,7 @@ services:
|
|||
MINIO_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
|
||||
MINIO_SECURE: "false"
|
||||
MINIO_BUCKET: ${MINIO_BUCKET_NAME:-accupedia-media}
|
||||
MEDIA_PRESIGN_ENDPOINT: http://localhost:9000
|
||||
MEDIA_PRESIGN_ENDPOINT: ${MEDIA_PRESIGN_ENDPOINT:-http://localhost:9000}
|
||||
MEDIA_STORAGE_ACCESS_KEY: ${MINIO_ACCESS_KEY:-minioadmin}
|
||||
MEDIA_STORAGE_SECRET_KEY: ${MINIO_SECRET_KEY:-minioadmin}
|
||||
MEDIA_STORAGE_BUCKET: ${MINIO_BUCKET_NAME:-accupedia-media}
|
||||
|
|
@ -119,7 +119,7 @@ services:
|
|||
ports:
|
||||
- "${BACKEND_PORT:-8000}:8000"
|
||||
volumes:
|
||||
- ${CONTENT_PATH:-../acupedia_content/acupedia-content}:/app/content:ro
|
||||
- ${CONTENT_PATH:-../../acupedia_content/acupedia-content}:/app/content:ro
|
||||
networks:
|
||||
- acupedia-net
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ services:
|
|||
# ============================================================
|
||||
store:
|
||||
build:
|
||||
context: ${ACUPEDIA_STORE_PATH:-../acupedia_store_ui}
|
||||
context: ${ACUPEDIA_STORE_PATH:-../../acupedia_store_ui}
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_BASE_PATH: ${VITE_STORE_BASE_PATH:-/store/}
|
||||
|
|
@ -146,7 +146,7 @@ services:
|
|||
# ============================================================
|
||||
admin:
|
||||
build:
|
||||
context: ${ACUPEDIA_ADMIN_PATH:-../acupedia_web_ui}
|
||||
context: ${ACUPEDIA_ADMIN_PATH:-../../acupedia_web_ui}
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
VITE_BASE_PATH: ${VITE_ADMIN_BASE_PATH:-/admin/}
|
||||
|
|
|
|||
Loading…
Reference in New Issue