diff --git a/docker/Dockerfile b/docker/Dockerfile index 14f43a7..6781b08 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -49,6 +49,9 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Copy source code COPY peikarband/ . +# Set PYTHONPATH to include /build so Reflex can find the app +ENV PYTHONPATH=/build:$PYTHONPATH + # Initialize Reflex and build frontend RUN reflex init --loglevel debug || true && \ reflex export --frontend-only --no-zip --loglevel debug || echo "Export completed with warnings" @@ -58,12 +61,14 @@ RUN reflex init --loglevel debug || true && \ RUN if [ -d "/build/.web" ] && [ -f "/build/.web/package.json" ]; then \ echo "Found .web directory with package.json, building frontend..." && \ cd /build/.web && \ + npm config set registry https://registry.npmjs.org/ && \ npm config set fetch-retry-mintimeout 20000 && \ npm config set fetch-retry-maxtimeout 120000 && \ npm config set fetch-retries 5 && \ npm config set fetch-timeout 300000 && \ if [ -f "package-lock.json" ]; then \ - npm ci --prefer-offline --no-audit --loglevel verbose; \ + npm ci --prefer-offline --no-audit --loglevel verbose || \ + (echo "npm ci failed, retrying with npm install..." && npm install --prefer-offline --no-audit --loglevel verbose); \ else \ echo "package-lock.json not found, using npm install..." && \ npm install --prefer-offline --no-audit --loglevel verbose; \ diff --git a/peikarband/rxconfig.py b/peikarband/rxconfig.py index 95486f8..3746938 100644 --- a/peikarband/rxconfig.py +++ b/peikarband/rxconfig.py @@ -13,7 +13,7 @@ BACKEND_PORT = int(os.getenv("BACKEND_PORT", "8000")) DB_URL = os.getenv("DATABASE_URL", "sqlite:////app/data/reflex.db") config = rx.Config( - app_name="peikarband", + app_name="src.presentation.web.pages.landing.index", api_url=API_URL, frontend_port=FRONTEND_PORT, backend_port=BACKEND_PORT,