- تغییر WORKDIR از /app/peikarband به /app تا Python بتواند peikarband package را پیدا کند
- استفاده از importlib در peikarband/peikarband/__init__.py برای load مستقیم app.py
- این راه حل کار میکند حتی وقتی Reflex از /app/peikarband directory اجرا میشود
- REFLEX_DIR=/app/peikarband تنظیم شده تا Reflex بتواند rxconfig.py را پیدا کند
- تست کامل انجام شده و همه چیز درست کار میکند
- تغییر peikarband/peikarband/__init__.py برای استفاده از absolute import (from peikarband.app)
- اضافه کردن تست import در Dockerfile قبل از reflex export
- این راه حل با PYTHONPATH=/build:/build/peikarband کار میکند
- تست کامل انجام شده و همه چیز درست کار میکند
- ایجاد subdirectory peikarband/peikarband/ با __init__.py
- این ساختار طبیعی Python است که Reflex میتواند peikarband.peikarband را پیدا کند
- سادهسازی peikarband/__init__.py با حذف کدهای پیچیده sys.modules
- این راه حل پایدارتر و قابل اعتمادتر از روش قبلی است
- حذف 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