- حذف peikarband.py که با peikarband/ directory تداخل داشت
- بهروزرسانی __init__.py برای ایجاد peikarband.peikarband submodule
- بهروزرسانی PYTHONPATH در Dockerfile برای پشتیبانی از src.* imports
- این تغییرات باعث میشود Reflex بتواند peikarband.peikarband را پیدا کند
- ایجاد peikarband/__init__.py برای فعالسازی package
- ایجاد peikarband/peikarband.py برای export کردن app
- تغییر Dockerfile برای حفظ ساختار peikarband package در /build/peikarband/ و /app/peikarband/
- بهروزرسانی مسیرهای reflex commands و REFLEX_DIR
- این تغییرات باعث میشود Reflex بتواند peikarband.peikarband را پیدا کند
- Re-declare ARG variables (VERSION, BUILD_DATE, GIT_COMMIT, etc.) in runtime stage
- Fixes UndefinedVar warnings for BUILD_DATE and VERSION
- ARG variables must be declared in each stage where they are used
- Create app.py in root directory to export app for Reflex
- Change app_name from 'src' to 'peikarband' to match root directory
- Fix relative import in src/__init__.py
- Fixes ModuleNotFoundError: Module src.src not found
- Export app from src/__init__.py so Reflex can find it
- Set app_name to 'src' in rxconfig.py to match module structure
- Remove .npmrc before setting npm registry to avoid mirror override
- Add registry verification in Dockerfile
- Fixes ModuleNotFoundError and npm registry issues
- Set PYTHONPATH to /build for Reflex to find app module
- Update app_name in rxconfig.py to match actual module path
- Configure npm to use registry.npmjs.org instead of mirror
- Add fallback from npm ci to npm install on failure
- Fixes ModuleNotFoundError: Module peikarband.peikarband not found
Problem: base stage had provenance/cache that app doesn't
Solution: Match base settings to app settings
Both stages now:
provenance: false
sbom: false
This matches what worked before!
Added:
✅ Better formatting with emojis
✅ Base image commands section
✅ Quick start guide
✅ Grouped commands logically
Run 'make help' to see all commands!
Base image now uses same repo with 'base' tag:
• hub.peikarband.ir/peikarband/landing:base
• hub.peikarband.ir/peikarband/landing:base-python3.11-node20
App image:
• hub.peikarband.ir/peikarband/landing:latest
• hub.peikarband.ir/peikarband/landing:{version}
All in same repository!
Solution to 413 Payload Too Large:
✅ Same repository: peikarband/landing
✅ Different tags: base, latest, {commit}
Images:
• hub.peikarband.ir/peikarband/landing:base (base image)
• hub.peikarband.ir/peikarband/landing:latest (app)
• hub.peikarband.ir/peikarband/landing:{commit} (app)
No new repo creation, no permission issues!
Before: hub.peikarband.ir/peikarband/base:latest
After: hub.peikarband.ir/peikarband/landing:base
This solves the 413 error because:
✅ Same repository (no new repo creation)
✅ Just different tags
✅ No permission/quota issues
Images:
• hub.peikarband.ir/peikarband/landing:base
• hub.peikarband.ir/peikarband/landing:latest
• hub.peikarband.ir/peikarband/landing:{commit}
New commands:
• make docker-build-base - Build base image locally
• make docker-push-base - Push base to Harbor
• make docker-build - Build app (updated to use base)
• make docker-push - Push app to Harbor
Usage:
1. make docker-login
2. make docker-build-base
3. make docker-push-base
4. make docker-build
5. make docker-push
Problem:
• 413 Payload Too Large error
• Harbor doesn't handle provenance/sbom metadata well
Solution:
✅ provenance: false (already was)
✅ sbom: false (new - disables SBOM generation)
✅ No cache settings (simpler, more compatible)
This makes images compatible with Harbor registry!
Pipeline now handles base image automatically:
✅ ensure-base-image:
• Checks if Dockerfile.base changed
• Only rebuilds if needed
• Saves ~10 minutes when unchanged
✅ build-and-push-app:
• Uses base image
• Fast build (~3 minutes)
✅ verify-images:
• Confirms both images exist
• Shows available tags
Behavior:
─────────
1️⃣ Dockerfile.base changed:
→ Build base (~10 min)
→ Build app (~3 min)
→ Total: ~13 min
2️⃣ Only code changed:
→ Skip base (path filter)
→ Build app (~3 min)
→ Total: ~3 min ✅
This is the smart solution we wanted!