|
|
|
|
@@ -54,10 +54,10 @@ COPY peikarband/ /build/peikarband/
|
|
|
|
|
# This allows both peikarband.peikarband and src.* imports to work
|
|
|
|
|
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
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
# Initialize Reflex and build frontend from peikarband directory
|
|
|
|
|
@@ -120,7 +120,7 @@ RUN groupadd -r peikarband && \
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
# 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.peikarband structure
|
|
|
|
|
# With app_name="peikarband", Reflex expects to find peikarband.peikarband module
|
|
|
|
|
# Copy application code to /app/peikarband/ to create peikarband.landing structure
|
|
|
|
|
# With app_name="landing", Reflex expects to find peikarband.landing 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.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
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 \
|
|
|
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
|
|