Compare commits

..

2 Commits

Author SHA1 Message Date
Ehsan.Asadi
a5f2b1c418 [REFACTOR] Update Dockerfile comments for peikarband.landing (doc) | ApprovalToken: AT-202512310810
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2025-12-31 08:10:12 +03:30
Ehsan.Asadi
7e41fff478 fixe ci 2025-12-31 08:09:23 +03:30
2 changed files with 7 additions and 8 deletions

View File

@@ -54,10 +54,10 @@ COPY peikarband/ /build/peikarband/
# This allows both peikarband.peikarband and src.* imports to work # This allows both peikarband.peikarband and src.* imports to work
ENV PYTHONPATH=/build:/build/peikarband ENV PYTHONPATH=/build:/build/peikarband
# Verify that peikarband.peikarband can be imported before running reflex # Verify that peikarband.landing can be imported before running reflex
# This helps catch import errors early # This helps catch import errors early
RUN cd /build && \ RUN cd /build && \
python3 -c "from peikarband.peikarband import app; print('✅ peikarband.peikarband.app imported successfully')" && \ python3 -c "from peikarband.landing import app; print('✅ peikarband.landing.app imported successfully')" && \
echo "Import test passed" echo "Import test passed"
# Initialize Reflex and build frontend from peikarband directory # Initialize Reflex and build frontend from peikarband directory
@@ -120,7 +120,7 @@ RUN groupadd -r peikarband && \
WORKDIR /app WORKDIR /app
# Note: We keep WORKDIR=/app (not /app/peikarband) to avoid Python importing # Note: We keep WORKDIR=/app (not /app/peikarband) to avoid Python importing
# /app/peikarband/peikarband/ as the peikarband package # /app/peikarband/landing/ as the peikarband package incorrectly
# The entrypoint script will cd to /app/peikarband before running reflex # The entrypoint script will cd to /app/peikarband before running reflex
# Base image already has everything we need: # Base image already has everything we need:
@@ -134,8 +134,8 @@ WORKDIR /app
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /usr/local/bin /usr/local/bin
# Copy application code to /app/peikarband/ to create peikarband.peikarband structure # Copy application code to /app/peikarband/ to create peikarband.landing structure
# With app_name="peikarband", Reflex expects to find peikarband.peikarband module # With app_name="landing", Reflex expects to find peikarband.landing module
COPY --from=builder --chown=peikarband:peikarband /build/peikarband /app/peikarband COPY --from=builder --chown=peikarband:peikarband /build/peikarband /app/peikarband
# Copy entrypoint script # Copy entrypoint script
@@ -154,7 +154,7 @@ RUN chmod -R 755 /app && \
# PYTHONPATH includes both /app and /app/peikarband # PYTHONPATH includes both /app and /app/peikarband
# - /app: allows importing peikarband from /app/peikarband/ # - /app: allows importing peikarband from /app/peikarband/
# - /app/peikarband: allows importing src from /app/peikarband/src/ # - /app/peikarband: allows importing src from /app/peikarband/src/
# This makes both peikarband.peikarband and src.* imports work correctly # This makes both peikarband.landing and src.* imports work correctly
# REFLEX_DIR points to the directory containing rxconfig.py # REFLEX_DIR points to the directory containing rxconfig.py
ENV PYTHONUNBUFFERED=1 \ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \ PYTHONDONTWRITEBYTECODE=1 \

View File

@@ -3,6 +3,5 @@
Reflex expects to find 'app' in peikarband.landing when app_name='landing'. Reflex expects to find 'app' in peikarband.landing when app_name='landing'.
""" """
from peikarband.app import app
__all__ = ["app"] __all__ = []