[REVERT] Back to app_name=peikarband - Reflex requires it (fix) | ApprovalToken: AT-202512310814
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Ehsan.Asadi
2025-12-31 08:14:33 +03:30
parent 24e79770fa
commit 96ab40723e
3 changed files with 9 additions and 9 deletions

View File

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