Compare commits

..

No commits in common. "a751488d9d0f34b04cdffdd76fbd79d9e6dba03c" and "b6f39d8d82bb804a40397f08f2ee38adea2f6a3e" have entirely different histories.

2 changed files with 7 additions and 80 deletions

View File

@ -41,16 +41,9 @@ With the clean Acupedia naming conventions:
- **Volumes**: `acupedia-postgres-data`, `acupedia-minio-data` - **Volumes**: `acupedia-postgres-data`, `acupedia-minio-data`
- **MinIO Bucket**: `acupedia-media` - **MinIO Bucket**: `acupedia-media`
### Step 2.1: Generate Container Git Info Metadata (Recommended) ### Start the containers:
Before building, run the script to capture the branch and commit of `api`, `store`, and `admin`:
```bash ```bash
cd ~/acupedia/acupedia_ops cd ~/acupedia/acupedia_ops
./scripts/generate-git-info.sh
```
### Step 2.2: Start the Containers
```bash
docker compose -f docker-compose.dev.yml up -d --build docker compose -f docker-compose.dev.yml up -d --build
``` ```
@ -65,7 +58,7 @@ Applies the four schemas (`auth`, `content`, `commerce`, `platform`), tables, in
```bash ```bash
docker compose -f docker-compose.dev.yml exec backend \ docker compose -f docker-compose.dev.yml exec backend \
psql postgresql://db_admin:C1234spl@postgres:5432/acupedia_db -f /app/schema/accupedia_db_v5.sql psql postgresql://db_admin:C1234spl@postgres:5432/acupedia_db -f /app/schema/acupedia_db_v5.sql
``` ```
--- ---
@ -147,8 +140,13 @@ docker compose -f docker-compose.dev.yml exec backend \
--- ---
<<<<<<< HEAD
### Step 3.6: Validate Database Integrity ### Step 3.6: Validate Database Integrity
Verifies all 9 required tables exist, counts roles, permissions, modules, published content items, and seeded media assets: 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 ```bash
docker compose -f docker-compose.dev.yml exec backend \ docker compose -f docker-compose.dev.yml exec backend \
@ -193,25 +191,3 @@ After running the manual steps above, test your endpoints:
| **Admin Portal** | `3001` | `http://<IP_OR_DOMAIN>:3001/admin/` | | **Admin Portal** | `3001` | `http://<IP_OR_DOMAIN>:3001/admin/` |
| **MinIO Console** | `9001` | `http://<IP_OR_DOMAIN>:9001` (`minioadmin` / `minioadmin`) | | **MinIO Console** | `9001` | `http://<IP_OR_DOMAIN>:9001` (`minioadmin` / `minioadmin`) |
| **MailHog UI** | `8025` | `http://<IP_OR_DOMAIN>:8025` | | **MailHog UI** | `8025` | `http://<IP_OR_DOMAIN>:8025` |
### Git Identity Verification (Inspect Container Branch & Commit)
To verify which branch and commit are running inside each container:
```bash
# 1. API Backend
docker compose -f docker-compose.dev.yml exec backend cat /app/.git_api_info
# 2. Storefront
docker compose -f docker-compose.dev.yml exec store cat /app/.git_store_info
# 3. Admin Portal
docker compose -f docker-compose.dev.yml exec admin cat /app/.git_admin_info
```
Example output:
```text
Branch: main
Commit: 29279bfd72a6fa296d1aa05a825bd88ca1f36c91
```

View File

@ -1,49 +0,0 @@
#!/usr/bin/env bash
# ============================================================
# Generate Git metadata files for API, Storefront, and Admin
# ============================================================
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
OPS_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${OPS_DIR}"
# Load environment file if present to resolve custom repo paths
if [ -f .env ]; then
export $(grep -v '^#' .env | grep -v '^\s*$' | xargs -d '\n' 2>/dev/null || true)
fi
API_PATH="${ACUPEDIA_API_PATH:-../../acupedia-api}"
STORE_PATH="${ACUPEDIA_STORE_PATH:-../../acupedia_store_ui}"
ADMIN_PATH="${ACUPEDIA_ADMIN_PATH:-../../acupedia_web_ui}"
# 1. Acupedia API
if [ -d "${API_PATH}/.git" ]; then
echo "Branch: $(git -C "${API_PATH}" rev-parse --abbrev-ref HEAD)" > "${API_PATH}/.git_api_info"
echo "Commit: $(git -C "${API_PATH}" rev-parse HEAD)" >> "${API_PATH}/.git_api_info"
echo "✅ Generated: ${API_PATH}/.git_api_info"
else
echo "⚠️ Skipping API: ${API_PATH}/.git not found"
fi
# 2. Acupedia Storefront
if [ -d "${STORE_PATH}/.git" ]; then
echo "Branch: $(git -C "${STORE_PATH}" rev-parse --abbrev-ref HEAD)" > "${STORE_PATH}/.git_store_info"
echo "Commit: $(git -C "${STORE_PATH}" rev-parse HEAD)" >> "${STORE_PATH}/.git_store_info"
echo "✅ Generated: ${STORE_PATH}/.git_store_info"
else
echo "⚠️ Skipping Storefront: ${STORE_PATH}/.git not found"
fi
# 3. Acupedia Admin (Web UI)
if [ -d "${ADMIN_PATH}/.git" ]; then
echo "Branch: $(git -C "${ADMIN_PATH}" rev-parse --abbrev-ref HEAD)" > "${ADMIN_PATH}/.git_admin_info"
echo "Commit: $(git -C "${ADMIN_PATH}" rev-parse HEAD)" >> "${ADMIN_PATH}/.git_admin_info"
echo "✅ Generated: ${ADMIN_PATH}/.git_admin_info"
else
echo "⚠️ Skipping Admin: ${ADMIN_PATH}/.git not found"
fi
echo "Done! You can now run: docker compose -f docker-compose.dev.yml up --build"